Created
March 12, 2018 17:54
-
-
Save dantenovski/2a436cb858590db2ec72c4f5c2b985e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Account = new Schema({ | |
email: { | |
type: String, | |
unique: true, | |
lowercase: true | |
}, | |
nickname: { | |
type: String, | |
unique: true, | |
lowercase: true | |
}, | |
password: String, | |
listings: [ | |
{ | |
itemOffered: String, | |
itemSought: String, | |
sellFor: Number, | |
description: String, | |
images: [] | |
} | |
] | |
}); | |
let saveListingForm = { $push: { listings: { | |
"itemOffered": itemOffered, | |
"itemSought": itemSought, | |
"sellFor": sellFor, | |
"description": description, | |
"images": ??? | |
} } }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment