Created
July 30, 2014 02:36
-
-
Save rdallaire/241dd48262ec856620c1 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
var data = { | |
"name": "Affinity", | |
"mainDeck": [ | |
{"qty": 4, "name": "Mox Opal"}, | |
{"qty": 4, "name": "Cranial Plating"}, | |
{"qty": 3, "name": "Glimmervoid"}, | |
{"qty": 4, "name": "Darksteel Citadel"}, | |
{"qty": 4, "name": "Galvanic Blast"}, | |
{"qty": 3, "name": "Etched Champion"}, | |
{"qty": 4, "name": "Ornithopter"}, | |
{"qty": 2, "name": "Memnite"}, | |
{"qty": 4, "name": "Sigil Pest"}, | |
{"qty": 4, "name": "Springleaf Drum"}, | |
{"qty": 1, "name": "Island"}, | |
{"qty": 3, "name": "Steel Overseer"}, | |
{"qty": 4, "name": "Thoughtcast"}, | |
{"qty": 4, "name": "Arcbound Ravager"}, | |
{"qty": 4, "name": "Blinkmoth Nexus"}, | |
{"qty": 4, "name": "Inkmoth Nexus"}, | |
{"qty": 4, "name": "Vault Skirge"} | |
] | |
} | |
$http.post('http://localhost:8080/api/decks', data); |
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
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var DeckSchema = new Schema({ | |
name: String, | |
mainDeck: [ | |
{ | |
qty: Number, | |
name: String | |
} | |
] | |
}); | |
module.exports = mongoose.model('Deck', DeckSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment