Merge "Set wsme decorator return type to None for some delete calls"
This commit is contained in:
commit
197fdd795f
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user