Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoythander committed Jan 10, 2019
1 parent e5a5390 commit 0f9ac26
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion apidoc.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions routes/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions routes/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions routes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0f9ac26

Please sign in to comment.