chore: get shortcut by name and workspace name

This commit is contained in:
Steven
2022-09-14 22:49:45 +08:00
parent ee801af742
commit 5a79304153
9 changed files with 170 additions and 39 deletions

View File

@@ -87,6 +87,10 @@ export function getShortcutList(shortcutFind?: ShortcutFind) {
return axios.get<ResponseObject<Shortcut[]>>(`/api/shortcut?${queryList.join("&")}`);
}
export function getShortcutWithNameAndWorkspaceName(workspaceName: string, shortcutName: string) {
return axios.get<ResponseObject<Shortcut>>(`/api/workspace/${workspaceName}/shortcut/${shortcutName}`);
}
export function createShortcut(shortcutCreate: ShortcutCreate) {
return axios.post<ResponseObject<Shortcut>>("/api/shortcut", shortcutCreate);
}