refac
This commit is contained in:
1 parent
71a39dbac1
commit
36a81ad43b
1 file changed
+21
-17
@@ -82,23 +82,27 @@
|
|||||||
loading = true;
|
loading = true;
|
||||||
|
|
||||||
if (validateCommandString(command)) {
|
if (validateCommandString(command)) {
|
||||||
await onSubmit({
|
try {
|
||||||
id: prompt?.id,
|
await onSubmit({
|
||||||
name,
|
id: prompt?.id,
|
||||||
command,
|
name,
|
||||||
content,
|
command,
|
||||||
tags: tags.map((tag) => tag.name),
|
content,
|
||||||
access_grants: accessGrants,
|
tags: tags.map((tag) => tag.name),
|
||||||
commit_message: commitMessage || undefined,
|
access_grants: accessGrants,
|
||||||
is_production: isProduction
|
commit_message: commitMessage || undefined,
|
||||||
});
|
is_production: isProduction
|
||||||
showEditModal = false;
|
});
|
||||||
commitMessage = '';
|
showEditModal = false;
|
||||||
isProduction = true;
|
commitMessage = '';
|
||||||
await loadHistory(true); // Reset and reload
|
isProduction = true;
|
||||||
// Select the newest version after saving
|
await loadHistory(true); // Reset and reload
|
||||||
if (history.length > 0) {
|
// Select the newest version after saving
|
||||||
selectedHistoryEntry = history[0];
|
if (history.length > 0) {
|
||||||
|
selectedHistoryEntry = history[0];
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
toast.error(`${error}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toast.error(
|
toast.error(
|
||||||
|
|||||||
Reference in new issue
Block a user