add create user method

This commit is contained in:
2024-11-20 15:32:43 +07:00
parent 074a202dc2
commit bd6b5fe4a8
10 changed files with 467 additions and 87 deletions
+17
View File
@@ -16,6 +16,14 @@ service SmmCore {
};
}
// users
rpc AddUser(CreateUserReq) returns (User) {
option (google.api.http) = {
post: "/users",
body: "*"
};
}
// categories
rpc AddCategory(CreateCategoryReq) returns (Category) {
option (google.api.http) = {
@@ -39,6 +47,15 @@ message PingReq {}
message PingRsp {}
message CreateUserReq {
string username = 1;
}
message User {
int32 id = 1;
string username = 2;
}
message CreateCategoryReq {
string name = 1;
int32 user_id = 2;