Initial import
This commit is contained in:
39
fo/one-dashboard-que/api/queue.js
Normal file
39
fo/one-dashboard-que/api/queue.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const URL = "/one-api/v1/su/queue/";
|
||||
|
||||
export async function now() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'now');
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function status() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'status');
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user