mirror of
https://github.com/adminlove520/AI-Account-Toolkit.git
synced 2026-05-14 09:17:38 +08:00
30 lines
722 B
JavaScript
30 lines
722 B
JavaScript
const baseUrl = "http://your-management-host:8318";
|
|
const token = "your-management-token";
|
|
const fileName = "demo@example.com.json";
|
|
|
|
fetch(`${baseUrl}/v0/management/auth-files/status`, {
|
|
headers: {
|
|
accept: "application/json, text/plain, */*",
|
|
authorization: `Bearer ${token}`,
|
|
"content-type": "application/json",
|
|
},
|
|
body: JSON.stringify({
|
|
name: fileName,
|
|
disabled: true,
|
|
}),
|
|
method: "PATCH",
|
|
});
|
|
|
|
fetch(`${baseUrl}/v0/management/auth-files/status`, {
|
|
headers: {
|
|
accept: "application/json, text/plain, */*",
|
|
authorization: `Bearer ${token}`,
|
|
"content-type": "application/json",
|
|
},
|
|
body: JSON.stringify({
|
|
name: fileName,
|
|
disabled: false,
|
|
}),
|
|
method: "PATCH",
|
|
});
|