mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Add qualification
This commit is contained in:
@ -25,7 +25,7 @@ const bcrypt = require('bcrypt');
|
||||
* @param {*} placeOfLiving
|
||||
* @returns
|
||||
*/
|
||||
function createPerson (email, password, displayName, dateOfBirth, available, enabled, placeOfLiving, aboutMe) {
|
||||
function createPerson (email, password, displayName, dateOfBirth, available, enabled, placeOfLiving, aboutMe, qualification) {
|
||||
const person = {
|
||||
email: email.toLowerCase(),
|
||||
password,
|
||||
@ -34,7 +34,8 @@ function createPerson (email, password, displayName, dateOfBirth, available, ena
|
||||
available,
|
||||
enabled,
|
||||
place_of_living: placeOfLiving,
|
||||
about_me: aboutMe
|
||||
about_me: aboutMe,
|
||||
qualification
|
||||
};
|
||||
return person;
|
||||
}
|
||||
|
@ -58,7 +58,8 @@ async function registerPerson (req, res) {
|
||||
req.body.available,
|
||||
false,
|
||||
req.body.place_of_living,
|
||||
req.body.about_me);
|
||||
req.body.about_me,
|
||||
req.body.qualification);
|
||||
await personModel.registerPerson(personToInsert, activationLink);
|
||||
return res.status(200).json({ activationLink });
|
||||
} catch (error) {
|
||||
@ -180,6 +181,10 @@ async function updatePerson (req, res) {
|
||||
updatePerson.about_me = req.body.about_me;
|
||||
}
|
||||
|
||||
if(req.body.qualification) {
|
||||
updatePerson.qualification = req.body.qualification;
|
||||
}
|
||||
|
||||
// If we are tying to change password, the old password must be provided
|
||||
if (req.body.old_password || req.body.new_password) {
|
||||
if(!req.body.old_password){
|
||||
|
Reference in New Issue
Block a user