chore: update redux store and service

This commit is contained in:
boojack
2022-05-22 11:01:20 +08:00
parent c3c2882dc5
commit a580df5c9f
27 changed files with 199 additions and 307 deletions

View File

@ -48,9 +48,16 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
try {
if (shortcutId) {
await shortcutService.updateShortcut(shortcutId, title, JSON.stringify(filters));
await shortcutService.patchShortcut({
id: shortcutId,
title,
payload: JSON.stringify(filters),
});
} else {
await shortcutService.createShortcut(title, JSON.stringify(filters));
await shortcutService.createShortcut({
title,
payload: JSON.stringify(filters),
});
}
} catch (error: any) {
toastHelper.error(error.message);