Add endpoint to replace specific plugin
This commit is contained in:
parent
2ba1f46149
commit
9a21c6ade8
3 changed files with 100 additions and 21 deletions
|
@ -61,6 +61,13 @@ class _Response:
|
|||
"errcode": "mxid_mismatch",
|
||||
}, status=HTTPStatus.BAD_REQUEST)
|
||||
|
||||
@property
|
||||
def pid_mismatch(self) -> web.Response:
|
||||
return web.json_response({
|
||||
"error": "The ID in the path does not match the ID of the uploaded plugin",
|
||||
"errcode": "pid_mismatch",
|
||||
}, status=HTTPStatus.BAD_REQUEST)
|
||||
|
||||
@property
|
||||
def bad_auth(self) -> web.Response:
|
||||
return web.json_response({
|
||||
|
@ -138,6 +145,13 @@ class _Response:
|
|||
"errcode": "user_exists",
|
||||
}, status=HTTPStatus.CONFLICT)
|
||||
|
||||
@property
|
||||
def plugin_exists(self) -> web.Response:
|
||||
return web.json_response({
|
||||
"error": "A plugin with the same ID as the uploaded plugin already exists",
|
||||
"errcode": "plugin_exists"
|
||||
}, status=HTTPStatus.CONFLICT)
|
||||
|
||||
@property
|
||||
def plugin_in_use(self) -> web.Response:
|
||||
return web.json_response({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue