Flatten nested repos
This commit is contained in:
39
test/vuex/one-ui-replication-status/api/replication.js
Normal file
39
test/vuex/one-ui-replication-status/api/replication.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const URL = "/one-api/tools/replikasi/replikasi/";
|
||||
|
||||
export async function status(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'status', prm);
|
||||
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 start_slave(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'start_slave', prm);
|
||||
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