From 0f9ac26e4753e61e7afa680cd2c4cba37fd91909 Mon Sep 17 00:00:00 2001 From: tanmoythander Date: Thu, 10 Jan 2019 22:37:22 +0600 Subject: [PATCH] bug fixed --- apidoc.json | 2 +- routes/admin.js | 4 ++-- routes/token.js | 8 ++++---- routes/user.js | 16 ++++++++-------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apidoc.json b/apidoc.json index a0418eb..b8581eb 100644 --- a/apidoc.json +++ b/apidoc.json @@ -1,6 +1,6 @@ { "name": "Node REST Server", - "version": "1.2.0", + "version": "1.2.1", "description": "REST API documentation for Node REST Server", "title": "API Documentation - Node REST Server", "footer": { diff --git a/routes/admin.js b/routes/admin.js index 5e1d267..700f35b 100644 --- a/routes/admin.js +++ b/routes/admin.js @@ -24,7 +24,7 @@ router.route('/profile') * @api {get} /admin/profile Get admin profile * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key Admin authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup AdminProfile * @apiExample Example usage: * url: http://localhost:3484/admin/profile @@ -79,7 +79,7 @@ router.route('/profile') * @api {put} /admin/profile Update admin profile * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key Admin authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup AdminProfile * @apiExample Example usage: * url: http://localhost:3484/admin/profile diff --git a/routes/token.js b/routes/token.js index 6393ea0..9cee6e7 100644 --- a/routes/token.js +++ b/routes/token.js @@ -43,7 +43,7 @@ var createHash = function(password) { /** * @api {post} /token/user/signup User Signup * @apiHeader {String} Content-Type application/json - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup Authentication * @apiExample Example usage: * url: http://localhost:3484/token/user/signup @@ -116,7 +116,7 @@ router.route('/user/signup') /** * @api {post} /token/user/login User Login * @apiHeader {String} Content-Type application/json - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup Authentication * @apiExample Example usage: * url: http://localhost:3484/token/user/login @@ -199,7 +199,7 @@ router.route('/user/login') /** * @api {post} /token/admin/signup Admin Signup * @apiHeader {String} Content-Type application/json - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup Authentication * @apiExample Example usage: * url: http://localhost:3484/token/admin/signup @@ -272,7 +272,7 @@ router.route('/admin/signup') /** * @api {post} /token/admin/login Admin Login * @apiHeader {String} Content-Type application/json - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup Authentication * @apiExample Example usage: * url: http://localhost:3484/token/admin/login diff --git a/routes/user.js b/routes/user.js index 9c35680..d1faf3c 100644 --- a/routes/user.js +++ b/routes/user.js @@ -55,7 +55,7 @@ router.route('/posts') * @api {post} /user/posts Create a post * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key User authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup UserPosts * @apiExample Example usage: * url: http://localhost:3484/user/posts @@ -115,7 +115,7 @@ router.route('/posts') * @api {get} /user/posts Get all user posts * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key User authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup UserPosts * @apiExample Example usage: * url: http://localhost:3484/user/posts @@ -153,7 +153,7 @@ router.route('/posts/:id') * @api {post} /user/posts/:id Update a post * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key User authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup UserPosts * @apiExample Example usage: * url: http://localhost:3484/user/posts/:id @@ -187,7 +187,7 @@ router.route('/posts/:id') }); } post.text = req.body.text; - post.updated_at = Date.now(); + post.updated_at = (new Date()).getTime(); post.save(function(err, post) { if(err) { return res.status(500).send({ @@ -211,7 +211,7 @@ router.route('/posts/:id') * @api {get} /user/posts/:id Get a post * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key User authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup UserPosts * @apiExample Example usage: * url: http://localhost:3484/user/posts/:id @@ -252,7 +252,7 @@ router.route('/posts/:id') * @api {delete} /user/posts/:id Delete a post * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key User authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup UserPosts * @apiExample Example usage: * url: http://localhost:3484/user/posts/:id @@ -333,7 +333,7 @@ router.route('/profile') * @api {get} /user/profile Get own profile * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key User authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup UserProfile * @apiExample Example usage: * url: http://localhost:3484/user/profile @@ -388,7 +388,7 @@ router.route('/profile') * @api {put} /user/profile Update own profile * @apiHeader {String} Content-Type application/json * @apiHeader {String} access-key User authentication token. - * @apiVersion 1.2.0 + * @apiVersion 1.2.1 * @apiGroup UserProfile * @apiExample Example usage: * url: http://localhost:3484/user/profile