feat: add shortcut tags in UI

This commit is contained in:
Steven
2023-06-23 12:34:02 +08:00
parent f3c758ff22
commit b3640699e0
4 changed files with 39 additions and 9 deletions

View File

@@ -47,13 +47,12 @@ export function getShortcutList(shortcutFind?: ShortcutFind) {
if (shortcutFind?.creatorId) {
queryList.push(`creatorId=${shortcutFind.creatorId}`);
}
if (shortcutFind?.tag) {
queryList.push(`tag=${shortcutFind.tag}`);
}
return axios.get<Shortcut[]>(`/api/v1/shortcut?${queryList.join("&")}`);
}
export function getShortcutWithNameAndWorkspaceName(workspaceName: string, shortcutName: string) {
return axios.get<Shortcut>(`/api/v1/workspace/${workspaceName}/shortcut/${shortcutName}`);
}
export function createShortcut(shortcutCreate: ShortcutCreate) {
return axios.post<Shortcut>("/api/v1/shortcut", shortcutCreate);
}