Flatten nested repos
This commit is contained in:
85
test/vuex/one-fo-klinik-setting/api/setting.js
Normal file
85
test/vuex/one-fo-klinik-setting/api/setting.js
Normal file
@@ -0,0 +1,85 @@
|
||||
const URL = "/one-api/klinik/setting/";
|
||||
|
||||
export async function searchmou(token,companyid,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'searchmou', {
|
||||
token: token,
|
||||
companyid: companyid,
|
||||
search: search
|
||||
});
|
||||
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 savesetting(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'savesetting',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 searchcompany(token,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'searchcompany', {
|
||||
token: token,
|
||||
search: search
|
||||
});
|
||||
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 get_data(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'get_data', 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