This commit is contained in:
Nikola Petrov
2023-08-02 14:27:35 +02:00
parent 96099f751b
commit f240d4e7c5
12 changed files with 164 additions and 191 deletions

View File

@@ -1,12 +1,11 @@
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Schema = mongoose.Schema;
var movieSchema = new Schema({
'title' : String,
'released' : String,
'webImg' : String,
'genre' : String,
'code' : String
'title': String,
'released': String,
'webImg': String,
'code': String
});
module.exports = mongoose.model('movie', movieSchema);

View File

@@ -1,9 +1,9 @@
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Schema = mongoose.Schema;
var photoSchema = new Schema({
'name' : String,
'path' : String
'name': String,
'path': String
});
module.exports = mongoose.model('photo', photoSchema);

View File

@@ -1,9 +1,9 @@
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Schema = mongoose.Schema;
var userSchema = new Schema({
'pass' : String,
'key' : String,
'pass': String,
'key': String,
});
module.exports = mongoose.model('user', userSchema);