mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-15 12:27:49 +00:00
feat: add update shortcut api
This commit is contained in:
@ -5,6 +5,7 @@ package slash.api.v2;
|
||||
import "api/v2/common.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
@ -25,6 +26,14 @@ service ShortcutService {
|
||||
body: "shortcut"
|
||||
};
|
||||
}
|
||||
// UpdateShortcut updates a shortcut.
|
||||
rpc UpdateShortcut(UpdateShortcutRequest) returns (UpdateShortcutResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v2/shortcuts/{shortcut.name}"
|
||||
body: "shortcut"
|
||||
};
|
||||
option (google.api.method_signature) = "shortcut,update_mask";
|
||||
}
|
||||
// DeleteShortcut deletes a shortcut by name.
|
||||
rpc DeleteShortcut(DeleteShortcutRequest) returns (DeleteShortcutResponse) {
|
||||
option (google.api.http) = {delete: "/api/v2/shortcuts/{name}"};
|
||||
@ -98,6 +107,16 @@ message CreateShortcutResponse {
|
||||
Shortcut shortcut = 1;
|
||||
}
|
||||
|
||||
message UpdateShortcutRequest {
|
||||
Shortcut shortcut = 1;
|
||||
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
message UpdateShortcutResponse {
|
||||
Shortcut shortcut = 1;
|
||||
}
|
||||
|
||||
message DeleteShortcutRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user