Flatten nested repos
This commit is contained in:
101
test/vuex/one-md-auto-verification/api/multirule.js
Normal file
101
test/vuex/one-md-auto-verification/api/multirule.js
Normal file
@@ -0,0 +1,101 @@
|
||||
const URL = "/one-api/mockup/masterdata/";
|
||||
|
||||
export async function search(token,search, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/searchhasil', { token:token,search: search, id: id });
|
||||
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(token, testid, hasilid) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/savemultirule', {
|
||||
testid: testid,
|
||||
hasilid: hasilid,
|
||||
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 lookup(token,id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/lookuphasil', { id: id , 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 xdelete(token, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/deletemultirule', { id: id, 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 selectvaluex(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/selectvaluex',{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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user