Last active
May 22, 2016 18:47
-
-
Save AlexanderKozhevin/f74c7338caca7c160dcee86b02872d73 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 RecordItem = new Schema({ | |
Email : {type: String}, | |
Key : {type: String}, | |
Username : {type: String}, | |
MPHEmail : {type: String}, | |
API : {type: String}, | |
AccountType : {type: String}, | |
card : {type: String} | |
}); | |
app.get('/modify' , function(request, response) { | |
var instance = new MyModel(); | |
var id = request.query.id; | |
var card = request.query.card; | |
if (id){ | |
id = id.toString(); | |
} | |
MyModel.findOne({Key: id}, function (err, doc){ | |
doc.card = card; | |
doc.save(function(){ | |
response.send('ok'); | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment