Skip to content

Instantly share code, notes, and snippets.

@dantenovski
Created March 12, 2018 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dantenovski/2a436cb858590db2ec72c4f5c2b985e0 to your computer and use it in GitHub Desktop.
Save dantenovski/2a436cb858590db2ec72c4f5c2b985e0 to your computer and use it in GitHub Desktop.
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