add create categories route
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-11-25 13:36:14 +07:00
parent 130a3236e0
commit 675c2884b7
12 changed files with 621 additions and 518 deletions
+10 -10
View File
@@ -73,6 +73,11 @@ service SmmCore {
delete: "/budgets/{budget_id}/users/{user_id}"
};
}
rpc GetBudgetCategories(GetBudgetCategoriesReq) returns (Categories) {
option (google.api.http) = {
get: "/budgets/{budget_id}/categories"
};
}
// categories
rpc AddCategory(AddCategoryReq) returns (Category) {
@@ -86,11 +91,6 @@ service SmmCore {
put: "/categories/{id}"
};
}
rpc GetCategories(GetCategoriesReq) returns (Categories) {
option (google.api.http) = {
get: "/categories"
};
}
rpc DeleteCategories(DeleteCategoriesReq) returns (Category) {
option (google.api.http) = {
delete: "/categories/{id}"
@@ -150,6 +150,7 @@ message Budget {
string name = 2;
int32 start_day = 3;
int32 monthly_limit = 4;
repeated Category categories = 5;
}
message UpdateBudgetReq {
@@ -187,6 +188,10 @@ message RemoveUserFromBudgetReq {
int32 budget_id = 2;
}
message GetBudgetCategoriesReq {
int32 budget_id = 2;
}
message AddCategoryReq {
string name = 1;
int32 budget_id = 2;
@@ -209,11 +214,6 @@ message UpdateCategoryReq {
int32 monthly_limit = 4;
}
message GetCategoriesReq {
bool favorite = 1;
int32 budget_id = 2;
}
message Categories {
repeated Category categories = 1;
}