Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions middlewares/validators/account.validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
newAccountValidator: [
VALIDATOR.stringValidator("body", "firstName", false),
VALIDATOR.stringValidator("body", "lastName", false),
VALIDATOR.stringValidator("body", "pronoun", false),
VALIDATOR.alphaArrayValidator("body", "pronoun", false),
VALIDATOR.stringValidator("body", "gender", false),
VALIDATOR.regexValidator("body", "email", false, Constants.EMAIL_REGEX),
VALIDATOR.alphaArrayValidator("body", "dietaryRestrictions", false),
Expand All @@ -24,7 +24,7 @@ module.exports = {
updateAccountValidator: [
VALIDATOR.stringValidator("body", "firstName", true),
VALIDATOR.stringValidator("body", "lastName", true),
VALIDATOR.stringValidator("body", "pronoun", true),
VALIDATOR.alphaArrayValidator("body", "pronoun", true),
VALIDATOR.stringValidator("body", "gender", true),
VALIDATOR.regexValidator("body", "email", true, Constants.EMAIL_REGEX),
VALIDATOR.alphaArrayValidator("body", "dietaryRestrictions", true),
Expand Down
4 changes: 2 additions & 2 deletions models/account.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const AccountSchema = new mongoose.Schema({
type: String,
required: true
},
pronoun: {
pronoun: [{
type: String,
default: "Prefer not to say"
},
}],
gender: {
type: String,
default: "Prefer not to say"
Expand Down
4 changes: 2 additions & 2 deletions routes/api/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = {
*
* @apiParam (body) {String} firstName First name of the account creator.
* @apiParam (body) {String} lastName Last name of the account creator.
* @apiParam (body) {String} pronoun the pronoun of the account creator.
* @apiParam (body) {String[]} pronoun the pronoun of the account creator.
* @apiParam (body) {String} email Email of the account.
* @apiParam (body) {String} gender Gender of the account creator.
* @apiParam (body) {String[]} dietaryRestrictions Any dietary restrictions for the user. 'None' if there are no restrictions
Expand Down Expand Up @@ -209,7 +209,7 @@ module.exports = {
*
* @apiParam (body) {String} [firstName] First name of the account creator.
* @apiParam (body) {String} [lastName] Last name of the account creator.
* @apiParam (body) {String} [pronoun] The pronoun of the account creator.
* @apiParam (body) {String[]} [pronoun] The pronoun of the account creator.
* @apiParam (body) {String} [email] Email of the account.
* @apiParam (body) {String} [gender] Gender of the account creator.
* @apiParam (body) {String} [age] Age of the account creator.
Expand Down
Loading