mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-08 11:19:30 +00:00
better partial config update
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import APIClient from '../../functions/APIClient';
|
||||
import { AppSettingsConfigType } from '../loader/loadAppsettingsConfig';
|
||||
|
||||
const updateAppsettingsConfig = async (
|
||||
configKey: string,
|
||||
configValue: string | boolean | number | null,
|
||||
) => {
|
||||
const updateAppsettingsConfig = async (updatedConfig: Partial<AppSettingsConfigType>) => {
|
||||
return APIClient('/api/appsettings/config/', {
|
||||
method: 'POST',
|
||||
body: { [configKey]: configValue },
|
||||
body: updatedConfig,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user