mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-20 00:18:47 -05:00
Merge pull request #3273 from bluewave-labs/fix/settings
fix: put -> patch
This commit is contained in:
@@ -27,7 +27,7 @@ import {
|
||||
import SettingsStats from "./SettingsStats.jsx";
|
||||
|
||||
import { useIsAdmin } from "@/Hooks/useIsAdmin.js";
|
||||
import { useGet, usePost, useDelete, useLazyGet, usePut } from "@/Hooks/UseApi";
|
||||
import { useGet, usePost, useDelete, useLazyGet, usePatch } from "@/Hooks/UseApi";
|
||||
// Constants
|
||||
const BREADCRUMBS = [{ name: `Settings`, path: "/settings" }];
|
||||
|
||||
@@ -62,10 +62,10 @@ const Settings = () => {
|
||||
}
|
||||
}, [fetchedSettings]);
|
||||
|
||||
const { put: saveSettingsFn, loading: isSaving } = usePut();
|
||||
const { patch: saveSettingsFn, loading: isSaving } = usePatch();
|
||||
|
||||
const saveSettings = async (settings) => {
|
||||
const response = await saveSettingsFn("/settings", { settings });
|
||||
const response = await saveSettingsFn("/settings", settings);
|
||||
if (response?.data) {
|
||||
const data = response.data;
|
||||
setIsApiKeySet(data.pagespeedKeySet);
|
||||
|
||||
Reference in New Issue
Block a user