16 lines
416 B
JavaScript
16 lines
416 B
JavaScript
const result_check = require("../../middlewares/result_check");
|
|
const Accounts = require("../../models/accounts");
|
|
|
|
exports.destroy = async function (aid) {
|
|
try {
|
|
const isComplete = await Accounts.destroy({
|
|
where: {
|
|
id: aid
|
|
}
|
|
}).then(result_check);
|
|
return isComplete;
|
|
} catch (error) {
|
|
console.log(error);
|
|
return false;
|
|
}
|
|
}; |