Fixes and upgrades (logging in / CORS headers expose / registering)

This commit is contained in:
2020-08-09 17:50:03 +02:00
parent 91cba76bff
commit 65939f314f
5 changed files with 23 additions and 42 deletions

View File

@@ -40,6 +40,9 @@ const restaurantSchema = mongoose.Schema({
},
phone: Number,
hidden: Boolean,
subscriptionActive: Boolean,
subscriptionStarted: String,
subscriptionDue: String,
dishes: [mongoose.Types.ObjectId],
});

View File

@@ -18,15 +18,8 @@ const userSchema = mongoose.Schema({
type: String,
required: true,
},
restaurantId: mongoose.Types.ObjectId,
subscriptionActive: {
type: Boolean,
required: true,
},
subscriptionDue: {
type: String,
required: true,
},
restaurants: [mongoose.Types.ObjectId],
trialUsed: Boolean,
});
export default mongoose.model("User", userSchema);