feat: filter selector model

This commit is contained in:
Timothy J. Baek
2024-06-20 01:44:52 -07:00
parent bf5775e07a
commit 08cc20cb93
8 changed files with 117 additions and 32 deletions
@@ -3,6 +3,7 @@
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
import { functions } from '$lib/stores';
import { createNewFunction, getFunctions } from '$lib/apis/functions';
import FunctionEditor from '$lib/components/workspace/Functions/FunctionEditor.svelte';
@@ -24,6 +25,7 @@
if (res) {
toast.success('Function created successfully');
functions.set(await getFunctions(localStorage.token));
await goto('/workspace/functions');
}
};
@@ -4,6 +4,7 @@
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { functions } from '$lib/stores';
import { updateFunctionById, getFunctions, getFunctionById } from '$lib/apis/functions';
import FunctionEditor from '$lib/components/workspace/Functions/FunctionEditor.svelte';
@@ -25,6 +26,7 @@
if (res) {
toast.success('Function updated successfully');
functions.set(await getFunctions(localStorage.token));
}
};