Refactor network service to use config objects for clarity

This commit is contained in:
Alex Holliday committed 2024-09-22 11:38:42 +08:00
1 parent a8e069b820
commit 1c8376dc24
11 files changed
+325 -286

No files matched your search

+4 -1
View File
@@ -69,7 +69,10 @@ const Settings = ({ isAdmin }) => {
const handleSave = async () => {
try {
setChecksIsLoading(true);
await networkService.updateChecksTTL(authToken, form.ttl);
await networkService.updateChecksTTL({
authToken: authToken,
ttl: form.ttl,
});
const updatedUser = { ...user, checkTTL: form.ttl };
const action = await dispatch(
update({ authToken, localData: updatedUser })