Skip to content

Instantly share code, notes, and snippets.

@tanaka-takayoshi
Created February 11, 2014 08:41
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 tanaka-takayoshi/8931271 to your computer and use it in GitHub Desktop.
Save tanaka-takayoshi/8931271 to your computer and use it in GitHub Desktop.
exports.post = function(request, response) {
var table = request.service.tables.getTable('sampletable');
table.insert({
userid: request.body.UserId,
text: request.body.Text
}, {
success: function(results) {
response.send(statusCodes.OK, { message : '拝承' });
}
});
};
exports.get = function(request, response) {
var table = request.service.tables.getTable('sampletable');
table.where({
userid: request.query.UserId
}).read({
success: function(results) {
response.send(statusCodes.OK, results);
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment