diff --git a/backend/routes/__pycache__/testingModel.cpython-310.pyc b/backend/routes/__pycache__/testingModel.cpython-310.pyc index 45bf28f4..aac059be 100644 Binary files a/backend/routes/__pycache__/testingModel.cpython-310.pyc and b/backend/routes/__pycache__/testingModel.cpython-310.pyc differ diff --git a/frontend/src/pages/Panel/Setting/Setting.jsx b/frontend/src/pages/Panel/Setting/Setting.jsx index 81a147a4..5cc75ad8 100644 --- a/frontend/src/pages/Panel/Setting/Setting.jsx +++ b/frontend/src/pages/Panel/Setting/Setting.jsx @@ -8,6 +8,7 @@ import { API_URL } from "../../../helpers/networt"; import { useToast } from '@/hooks/use-toast'; const Setting = () => { + const [isLoading, setIsLoading] = useState(false); const { toast } = useToast(); const getemail = localStorage.getItem("email"); const idUser = localStorage.getItem("idUser"); @@ -87,6 +88,7 @@ const Setting = () => { } const handleSaveDataKernel = async () => { + setIsLoading(true); const token = localStorage.getItem("token"); console.log(selectedKernelfalse) console.log(selectedKernel) @@ -166,6 +168,17 @@ const Setting = () => { ); } + const hasil = await axios.get( + `${API_URL}/predict/price`, + { + headers: { + "Content-Type": "application/json", + Accept: "application/json", + Authorization: `Bearer ${token}`, + }, + } + ); + toast({ description: "Pengaturan model berhasil disimpan", }); @@ -178,6 +191,8 @@ const Setting = () => { description: `${error.response.data.detail}`, variant: "destructive", }); + } finally { + setIsLoading(false); } } return ( @@ -340,7 +355,7 @@ const Setting = () => {
- +