diff --git a/src/database/db_build.js b/src/database/db_build.js index 0aa0d75..a2e5d8f 100644 --- a/src/database/db_build.js +++ b/src/database/db_build.js @@ -1,6 +1,7 @@ const { db, mongoose } = require('./db_connect'); +const AddEvent=mongoose.model('event,eventSchema') -db.on('error', console.error.bind(console, 'connection error')) +db.on('error', console.error.bind(console, 'connection error'); .once('open', () => { console.log('we\'re live'); }); @@ -16,7 +17,7 @@ const usersSchema = new Schema({ email: { type: String, unique: true }, }); -const NinjaSchema = new Schema({ +const AddEventSchema = new Schema({ startDate: Date, endDate: Date, title: String, diff --git a/src/views/addEvent.hbs b/src/views/addEvent.hbs index eac12aa..5c7e299 100644 --- a/src/views/addEvent.hbs +++ b/src/views/addEvent.hbs @@ -34,7 +34,6 @@ function myFunction() { } - \ No newline at end of file