Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.get('#/reply', function (context) {
- var fields = this.params, doc = {};
- doc.content = fields.post;
- doc.datetime = new Date.now();
- doc.thread_id = fields.thread_id;
- doc.type = 'post';
- doc.user_id = 'chapel';
- db.saveDoc(doc, {
- success: function() {
- this.redirect('#/thread/'+fields.thread_id);
- },
- error: function() {
- alert('Error saving document.');
- this.redirect('#/thread/'+fields.thread_id);
- }
- })
- });
Add Comment
Please, Sign In to add comment