This commit is contained in:
xfarrow
2024-03-18 17:54:57 +01:00
parent 072d659425
commit 86bb9717d8
4 changed files with 51 additions and 9 deletions

View File

@ -72,6 +72,14 @@ async function findById(jobOfferId) {
}).select().first();
}
async function findByOrganizationId(organizationId){
const result = await knex('JobOffer')
.where({organization_id: organizationId})
.select();
console.log(result);
return result;
}
// test
async function filter(title, description, requirements, salary, salaryOperator, salaryFrequency, location, tags) {
let query = knex('JobOffer');
@ -105,5 +113,6 @@ async function filter(title, description, requirements, salary, salaryOperator,
module.exports = {
insert,
remove
remove,
findByOrganizationId
}