fix: Change update user routes to use PUT instead of POST

This commit is contained in:
Blade Barringer
2016-03-16 08:41:56 -05:00
parent 6d14b9d5c5
commit 22d25f8be3
4 changed files with 27 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ api.getUser = {
};
/**
* @api {post} /user/update-password
* @api {put} /user/update-password
* @apiVersion 3.0.0
* @apiName updatePassword
* @apiGroup User
@@ -53,7 +53,7 @@ api.getUser = {
* @apiSuccess {Object} The success message
**/
api.updatePassword = {
method: 'POST',
method: 'PUT',
middlewares: [authWithHeaders(), cron],
url: '/user/update-password',
async handler (req, res) {
@@ -82,7 +82,7 @@ api.updatePassword = {
};
/**
* @api {post} /user/update-username
* @api {put} /user/update-username
* @apiVersion 3.0.0
* @apiName updateUsername
* @apiGroup User
@@ -91,7 +91,7 @@ api.updatePassword = {
* @apiSuccess {Object} The new username
**/
api.updateUsername = {
method: 'POST',
method: 'PUT',
middlewares: [authWithHeaders(), cron],
url: '/user/update-username',
async handler (req, res) {
@@ -128,7 +128,7 @@ api.updateUsername = {
/**
* @api {post} /user/update-email
* @api {put} /user/update-email
* @apiVersion 3.0.0
* @apiName UpdateEmail
* @apiGroup User
@@ -139,7 +139,7 @@ api.updateUsername = {
* @apiSuccess {Object} An object containing the new email address
*/
api.updateEmail = {
method: 'POST',
method: 'PUT',
middlewares: [authWithHeaders(), cron],
url: '/user/update-email',
async handler (req, res) {