mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Update job_offer_model.js
This commit is contained in:
@ -53,15 +53,17 @@ async function remove(requester, jobOfferId) {
|
||||
}
|
||||
|
||||
const isAdmin = await OrganizationAdmin.isAdmin(requester, jobOffer.organization_id);
|
||||
if (isAdmin) {
|
||||
|
||||
if (!isAdmin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const deletedRows = await knex('JobOffer')
|
||||
.where({
|
||||
id: jobOfferId
|
||||
}).del();
|
||||
})
|
||||
.del();
|
||||
return deletedRows === 1;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function findById(jobOfferId) {
|
||||
|
Reference in New Issue
Block a user