Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
communications-backbone
Commits
0a48aa56
Commit
0a48aa56
authored
2 years ago
by
James Kirk
Browse files
Options
Download
Email Patches
Plain Diff
refactor: returns into aborts
parent
9f6bfd59
dev
11-add-websockets
master
v1.0.0
v0.1.0
v0.0.1
2 merge requests
!23
Resolve "Release v0.1.0"
,
!17
fix: correct error code resp
Pipeline
#108973
passed with stages
in 1 minute and 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
endpoints/client.py
endpoints/client.py
+2
-2
endpoints/notify.py
endpoints/notify.py
+1
-1
endpoints/send.py
endpoints/send.py
+1
-1
No files found.
endpoints/client.py
View file @
0a48aa56
...
@@ -43,7 +43,7 @@ class Client(Resource):
...
@@ -43,7 +43,7 @@ class Client(Resource):
try
:
try
:
args
=
request
.
get_json
()
args
=
request
.
get_json
()
except
BadRequest
:
except
BadRequest
:
return
"POSTed body is invalid JSON"
,
400
abort
(
400
,
message
=
"POSTed body is invalid JSON"
)
errors
=
self
.
schema
.
validate
(
args
)
errors
=
self
.
schema
.
validate
(
args
)
if
errors
:
if
errors
:
...
@@ -73,7 +73,7 @@ class ClientList(Resource):
...
@@ -73,7 +73,7 @@ class ClientList(Resource):
try
:
try
:
args
=
request
.
get_json
()
args
=
request
.
get_json
()
except
BadRequest
:
except
BadRequest
:
return
"POSTed body is invalid JSON"
,
400
abort
(
400
,
message
=
"POSTed body is invalid JSON"
)
errors
=
self
.
schema
.
validate
(
args
)
errors
=
self
.
schema
.
validate
(
args
)
if
errors
:
if
errors
:
...
...
This diff is collapsed.
Click to expand it.
endpoints/notify.py
View file @
0a48aa56
...
@@ -24,7 +24,7 @@ class Notify(AuthResource):
...
@@ -24,7 +24,7 @@ class Notify(AuthResource):
try
:
try
:
args
=
request
.
get_json
()
args
=
request
.
get_json
()
except
BadRequest
:
except
BadRequest
:
return
"POSTed body is invalid JSON"
,
400
abort
(
400
,
message
=
"POSTed body is invalid JSON"
)
errors
=
self
.
schema
.
validate
(
args
)
errors
=
self
.
schema
.
validate
(
args
)
if
errors
:
if
errors
:
...
...
This diff is collapsed.
Click to expand it.
endpoints/send.py
View file @
0a48aa56
...
@@ -25,7 +25,7 @@ class Send(AuthResource):
...
@@ -25,7 +25,7 @@ class Send(AuthResource):
try
:
try
:
args
=
request
.
get_json
()
args
=
request
.
get_json
()
except
BadRequest
:
except
BadRequest
:
return
"POSTed body is invalid JSON"
,
400
abort
(
400
,
message
=
"POSTed body is invalid JSON"
)
errors
=
self
.
schema
.
validate
(
args
)
errors
=
self
.
schema
.
validate
(
args
)
if
errors
:
if
errors
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment