[重构] 将多个 API 接口的请求方法从 PUT 和 DELETE 更改为 POST,并更新相关路由

This commit is contained in:
ryan
2026-03-17 09:57:38 +08:00
parent 2cdb844010
commit 2c17f3289b
18 changed files with 80 additions and 79 deletions
@@ -13,8 +13,8 @@ export function getOptions() {
}
export function updateOption(key: string, value: string) {
return apiRequest<void>('/option/', {
method: 'PUT',
return apiRequest<void>('/option/update', {
method: 'POST',
body: JSON.stringify({ key, value }),
});
}
@@ -41,8 +41,8 @@ export function getSettingsProfile() {
}
export function updateSelf(payload: UpdateSelfPayload) {
return apiRequest<void>('/user/self', {
method: 'PUT',
return apiRequest<void>('/user/self/update', {
method: 'POST',
body: JSON.stringify(payload),
});
}