Add category products query and update endpoints
This commit is contained in:
@@ -73,6 +73,19 @@ service ProductsContract
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
|
||||
rpc GetProductsForCategory(GetProductsForCategoryRequest) returns (GetProductsForCategoryResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/GetProductsForCategory"
|
||||
};
|
||||
};
|
||||
|
||||
rpc UpdateCategoryProducts(UpdateCategoryProductsRequest) returns (google.protobuf.Empty){
|
||||
option (google.api.http) = {
|
||||
post: "/UpdateCategoryProducts"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
message ImageFileModel
|
||||
@@ -269,3 +282,26 @@ message UpdateProductCategoriesRequest
|
||||
int64 product_id = 1;
|
||||
repeated int64 category_ids = 2;
|
||||
}
|
||||
|
||||
message CategoryProductItem
|
||||
{
|
||||
int64 id = 1;
|
||||
string title = 2;
|
||||
bool selected = 3;
|
||||
}
|
||||
|
||||
message GetProductsForCategoryRequest
|
||||
{
|
||||
int64 category_id = 1;
|
||||
}
|
||||
|
||||
message GetProductsForCategoryResponse
|
||||
{
|
||||
repeated CategoryProductItem items = 1;
|
||||
}
|
||||
|
||||
message UpdateCategoryProductsRequest
|
||||
{
|
||||
int64 category_id = 1;
|
||||
repeated int64 product_ids = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user