web i server: login, post thought, get thoughts

This commit is contained in:
nau
2016-08-21 20:57:24 +02:00
parent ab562292cc
commit 21d8768a09
18 changed files with 890 additions and 100 deletions

View File

@@ -5,7 +5,8 @@ var mongoose = require('mongoose'),
var thoughtSchema = new Schema({
time: { type: String },
content: { type: String },
user_id: { type: String },
fav: { type: String } //array amb els users que posen fav
username: { type: String },
fav: { type: String }, //array amb els users que posen fav
avatar: { type: String }
})
module.exports = mongoose.model('thoughtModel', thoughtSchema);

View File

@@ -17,7 +17,7 @@ var userSchema = new Schema({
username: { type: String },
password: { type: String },
description: { type: String },
icon: { type: String },
avatar: { type: String },
mail: { type: String },
admin: { type: Boolean }
})