/**
* get current usage outside of premium workspaces
*
*/
export async function main() {
const url = new URL(`${BASE_URL}/api/users/usage`);
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Bearer " + WM_TOKEN,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.text();
}
Submitted by hugo697 207 days ago
/**
* get current usage outside of premium workspaces
*
*/
export async function main() {
const url = new URL(`${BASE_URL}/api/users/usage`);
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Bearer " + WM_TOKEN,
},
body: undefined,
});
return await response.text();
}
Submitted by admin 278 days ago