refactor: server update API method

This commit is contained in:
Tristan Yang
2023-04-04 10:52:10 +08:00
parent 6972e15530
commit 5b3ee6652f
+3 -3
View File
@@ -175,7 +175,7 @@ export const serverApi = createApi({
"content-type": "image/png"
},
url: `admin/system/organization/logo`,
method: "POST",
method: "PUT",
body: data
}),
async onQueryStarted(data, { dispatch, queryFulfilled }) {
@@ -208,10 +208,10 @@ export const serverApi = createApi({
return `${location.origin}${invite.pathname}${invite.search}${invite.hash}`;
}
}),
updateServer: builder.mutation<void, Server>({
updateServer: builder.mutation<void, Partial<Server>>({
query: (data) => ({
url: "admin/system/organization",
method: "POST",
method: "PUT",
body: data
}),
async onQueryStarted(data, { dispatch, queryFulfilled, getState }) {