generated from CMU-17313Q/NodeBB-f23
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mohammad Anann
authored and
Mohammad Anann
committed
Nov 10, 2023
1 parent
17d8038
commit fb4782b
Showing
7 changed files
with
59 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,4 +109,4 @@ define('forum/career', [ | |
} | ||
|
||
return Career; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
const user = require('../user'); | ||
const helpers = require('./helpers'); | ||
|
||
const careerController = module.exports; | ||
|
||
careerController.get = async function (req, res) { | ||
const userData = await user.getUserFields(req.uid, ['accounttype']); | ||
|
||
const accountType = userData.accounttype; | ||
let careerData = {}; | ||
|
||
if (accountType === 'recruiter') { | ||
careerData.allData = await user.getAllCareerData(); | ||
} else { | ||
const userCareerData = await user.getCareerData(req.uid); | ||
if (userCareerData) { | ||
careerData = userCareerData; | ||
} else { | ||
careerData.newAccount = true; | ||
} | ||
} | ||
|
||
careerData.accountType = accountType; | ||
careerData.breadcrumbs = helpers.buildBreadcrumbs([{ text: 'Career', url: '/career' }]); | ||
res.render('career', careerData); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
const router = require('express').Router(); | ||
const controllers = require('../../controllers'); | ||
|
||
|
||
const routeHelpers = require('../helpers'); | ||
|
||
const { setupApiRoute } = routeHelpers; | ||
|
||
module.exports = function () { | ||
setupApiRoute(router, 'post', 'career/register', controllers.write.career.register); | ||
|
||
|
||
return router; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters