Files
FE_CPONE/test/vuex/one-md-email-notification-config/api/form.js
2026-05-28 11:22:58 +07:00

40 lines
912 B
JavaScript

const URL = "/one-api/email_notification/Config_email/";
export async function getdata(token,id) {
try {
var resp = await axios.post(URL + 'getdata', { token:token });
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 save(prm) {
try {
var resp = await axios.post(URL + 'save', 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
};
}
}