add change status buttons

This commit is contained in:
2026-07-26 00:22:30 +07:00
parent e7b7c1180b
commit 93b131dbca
11 changed files with 790 additions and 656 deletions
+43 -4
View File
@@ -240,6 +240,28 @@ service EveningDetectiveServer {
};
}
rpc PublicScenario(PublicScenarioReq) returns (PublicScenarioRsp) {
option (google.api.http) = {
put : "/api/scenarios/{id}/public"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Сценарии";
summary: "Опубликовать сценарий";
};
}
rpc DraftScenario(DraftScenarioReq) returns (DraftScenarioRsp) {
option (google.api.http) = {
put : "/api/scenarios/{id}/draft"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Сценарии";
summary: "Снять с публикации сценарий";
};
}
rpc DeleteScenario(DeleteScenarioReq) returns (DeleteScenarioRsp) {
option (google.api.http) = {
delete: "/api/scenarios/{id}"
@@ -435,10 +457,11 @@ message Scenario {
optional string description = 3;
optional string image = 4;
Story story = 5;
User author = 6;
google.protobuf.Timestamp updated_at = 7;
google.protobuf.Timestamp created_at = 8;
google.protobuf.Timestamp published_at = 9;
string status = 6;
User author = 7;
google.protobuf.Timestamp updated_at = 8;
google.protobuf.Timestamp created_at = 9;
google.protobuf.Timestamp published_at = 10;
}
message Story {
@@ -482,6 +505,22 @@ message UpdateScenarioRsp {
string error = 1;
}
message PublicScenarioReq {
int32 id = 1;
}
message PublicScenarioRsp {
string error = 1;
}
message DraftScenarioReq {
int32 id = 1;
}
message DraftScenarioRsp {
string error = 1;
}
message DeleteScenarioReq {
int32 id = 1;
}