-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing default response (HTTP/204) for DELETE handlers #28
Conversation
d399b15
to
b9ce629
Compare
b9ce629
to
da51295
Compare
@@ -111,6 +111,7 @@ def patch(self, args, team): | |||
) | |||
@api.permission_required(permissions.WriteAccessPermission()) | |||
@api.response(code=http_exceptions.Conflict.code) | |||
@api.response(code=204) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
204 is still used as a hard-coding here. Later, I would like to replace the http_exceptions
with this http
module.
324035b
to
3860d2f
Compare
@@ -14,13 +14,14 @@ | |||
from app.extensions.api.parameters import PaginationParameters | |||
from app.modules.users import permissions | |||
from app.modules.users.models import User | |||
from flask.ext.restplus_patched._http import HTTPStatus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a deprecated way of importing flask extentions. Please, just use from flask_restplus_patched...
and also put it in the previous group of imports.
Add response(code=204) to delete in teams/resources.py Updated team delete test to expect 204 status instead of 200 Add constant for status code
3860d2f
to
90ac8ee
Compare
|
||
from app.extensions import db | ||
from app.extensions.api import Namespace, abort, http_exceptions | ||
from app.extensions.api.parameters import PaginationParameters | ||
from app.modules.users import permissions | ||
from app.modules.users.models import User | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need in this extra space line, but I will merge and we just fix this later.
Closes #26: Add missing default response (HTTP/204) for DELETE handlers
Refactor response decorator in namespace of flasл_resplus_patched
Add response(code=204) to delete in teams/resources.py
Updated team delete test to expect 204 status instead of 200
I will provide constant for 204-code in one of future commit if you don't mind. Any of packages haven't what you want. We have to create our own constants.