chore: fix update resource api

This commit is contained in:
Steven
2023-10-21 12:41:55 +08:00
parent c42af95dd3
commit bfd2dbfee2
13 changed files with 375 additions and 281 deletions

View File

@@ -3,6 +3,8 @@ syntax = "proto3";
package memos.api.v2;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/protobuf/field_mask.proto";
option go_package = "gen/api/v2";
@@ -11,7 +13,11 @@ service SystemService {
option (google.api.http) = {get: "/api/v2/system/info"};
}
rpc UpdateSystemInfo(UpdateSystemInfoRequest) returns (UpdateSystemInfoResponse) {
option (google.api.http) = {post: "/api/v2/system/info"};
option (google.api.http) = {
patch: "/api/v2/system/info",
body: "system_info"
};
option (google.api.method_signature) = "system_info,update_mask";
}
}
@@ -34,8 +40,7 @@ message GetSystemInfoResponse {
message UpdateSystemInfoRequest {
// System info is the updated data.
SystemInfo system_info = 1;
// Update mask is the array of paths.
repeated string update_mask = 2;
google.protobuf.FieldMask update_mask = 2;
}
message UpdateSystemInfoResponse {