Skip to content

Commit

Permalink
[HOLD] Update to Event model - Issue #408 (#420)
Browse files Browse the repository at this point in the history
* update to Event model

* linting update

* readding cross-env

* update to the status field default value
  • Loading branch information
guel-codes authored Jun 8, 2023
1 parent 8e6d92a commit fef271c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
45 changes: 17 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dependencies": {
"@js-temporal/polyfill": "^0.4.3",
"connect-mongo": "^3.2.0",
"cross-env": "^7.0.3",
"date-fns": "^2.29.3",
"dotenv": "^8.2.0",
"express": "^4.17.1",
Expand All @@ -52,7 +53,6 @@
"autoprefixer": "^10.4.13",
"axios": "^1.1.3",
"concurrently": "^7.5.0",
"cross-env": "^7.0.3",
"cypress": "^12.2.0",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
6 changes: 6 additions & 0 deletions server/models/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ const EventSchema = new mongoose.Schema(
message: "should be greater than 'startAt' field",
},
},
status: {
type: String,
default: "active",
maxLength: STRING_MAX_LENGTH,
required: true,
},
location: {
type: String,
trim: true,
Expand Down

0 comments on commit fef271c

Please sign in to comment.