Set wsme decorator return type to None for some delete calls

This patch fixes Storyboard returning a body along with
a DELETE response 204 No Content for some endpoints.

Change-Id: I3d21e98d5cd737b652f001c403c827e9d2a0c197
Co-Authored-By: Matthieu Huin <mhuin@redhat.com>
This commit is contained in:
Fabien Boucher 2017-05-10 17:55:53 +02:00
parent 6c56506bc5
commit 6398006749
4 changed files with 5 additions and 5 deletions

View File

@ -336,7 +336,7 @@ class StoriesController(rest.RestController):
@decorators.db_exceptions
@secure(checks.superuser)
@wsme_pecan.wsexpose(wmodels.Story, int, status_code=204)
@wsme_pecan.wsexpose(None, int, status_code=204)
def delete(self, story_id):
"""Delete this story. This command is only available to Admin users.

View File

@ -417,7 +417,7 @@ class TasksPrimaryController(rest.RestController):
@decorators.db_exceptions
@secure(checks.authenticated)
@wsme_pecan.wsexpose(wmodels.Task, int, status_code=204)
@wsme_pecan.wsexpose(None, int, status_code=204)
def delete(self, task_id):
"""Delete this task.
@ -674,7 +674,7 @@ class TasksNestedController(rest.RestController):
@decorators.db_exceptions
@secure(checks.authenticated)
@wsme_pecan.wsexpose(wmodels.Task, int, int, status_code=204)
@wsme_pecan.wsexpose(None, int, int, status_code=204)
def delete(self, story_id, task_id):
"""Delete this task.

View File

@ -406,7 +406,7 @@ class CommentsController(rest.RestController):
@decorators.db_exceptions
@secure(checks.superuser)
@wsme_pecan.wsexpose(wmodels.Comment, int, int, status_code=204)
@wsme_pecan.wsexpose(None, int, int, status_code=204)
def delete(self, story_id, comment_id):
"""Delete an existing comment. This command is disabled by default.

View File

@ -214,7 +214,7 @@ class UserTokensController(rest.RestController):
@decorators.db_exceptions
@secure(checks.authenticated)
@wsme_pecan.wsexpose(wmodels.AccessToken, int, int, status_code=204)
@wsme_pecan.wsexpose(None, int, int, status_code=204)
def delete(self, user_id, access_token_id):
"""Deletes an access token with assigned refresh token for the given
user. Admin users can delete any access tokens, regular users can only