refac: prompt endpoints
This commit is contained in:
1 parent
dff0141160
commit
5ad593e465
6 files changed
+172
-114
No files matched your search
@@ -9,7 +9,7 @@
|
||||
|
||||
import {
|
||||
createNewPrompt,
|
||||
deletePromptByCommand,
|
||||
deletePromptById,
|
||||
getPrompts,
|
||||
getPromptList
|
||||
} from '$lib/apis/prompts';
|
||||
@@ -121,7 +121,7 @@
|
||||
const deleteHandler = async (prompt) => {
|
||||
const command = prompt.command;
|
||||
|
||||
const res = await deletePromptByCommand(localStorage.token, command).catch((err) => {
|
||||
const res = await deletePromptById(localStorage.token, prompt.id).catch((err) => {
|
||||
toast.error(err);
|
||||
return null;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user