mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-15 04:17:50 +00:00
chore: update shortcut definition
This commit is contained in:
@ -17,8 +17,8 @@ service ShortcutService {
|
||||
}
|
||||
// GetShortcut returns a shortcut by name.
|
||||
rpc GetShortcut(GetShortcutRequest) returns (GetShortcutResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/shortcuts/{name}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.api.http) = {get: "/api/v2/shortcuts/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
// CreateShortcut creates a shortcut.
|
||||
rpc CreateShortcut(CreateShortcutRequest) returns (CreateShortcutResponse) {
|
||||
@ -30,15 +30,15 @@ service ShortcutService {
|
||||
// UpdateShortcut updates a shortcut.
|
||||
rpc UpdateShortcut(UpdateShortcutRequest) returns (UpdateShortcutResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v2/shortcuts/{shortcut.name}"
|
||||
put: "/api/v2/shortcuts/{shortcut.id}"
|
||||
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}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.api.http) = {delete: "/api/v2/shortcuts/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,9 @@ message Shortcut {
|
||||
|
||||
Visibility visibility = 11;
|
||||
|
||||
OpenGraphMetadata og_metadata = 12;
|
||||
int32 view_count = 12;
|
||||
|
||||
OpenGraphMetadata og_metadata = 13;
|
||||
}
|
||||
|
||||
message OpenGraphMetadata {
|
||||
@ -93,7 +95,7 @@ message ListShortcutsResponse {
|
||||
}
|
||||
|
||||
message GetShortcutRequest {
|
||||
string name = 1;
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message GetShortcutResponse {
|
||||
@ -119,7 +121,7 @@ message UpdateShortcutResponse {
|
||||
}
|
||||
|
||||
message DeleteShortcutRequest {
|
||||
string name = 1;
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteShortcutResponse {}
|
||||
|
Reference in New Issue
Block a user