mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 07:06:36 +08:00
[重构] 将多个 API 接口的请求方法从 PUT 和 DELETE 更改为 POST,并更新相关路由
This commit is contained in:
@@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user