Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TousAntiCovid sources
Cléa Server
Commits
1d6ea9b6
Commit
1d6ea9b6
authored
Aug 27, 2021
by
Bergamote Orange
Browse files
bugfix(clea-ws-rest): return 200 OK instead of 400 BAD REQUEST when no accepted visits
parent
4327697e
Changes
1
Show whitespace changes
Inline
Side-by-side
clea-ws-rest/src/main/java/fr/gouv/clea/ws/controller/CleaController.java
View file @
1d6ea9b6
...
...
@@ -40,16 +40,12 @@ public class CleaController implements CleaApi {
final
var
message
=
String
.
format
(
"%d/%d accepted visits"
,
acceptedVisits
,
reportRequest
.
getVisits
().
size
());
log
.
info
(
message
);
if
(
acceptedVisits
>
0
)
{
return
ResponseEntity
.
ok
(
ReportResponse
.
builder
()
.
success
(
true
)
.
message
(
message
)
.
build
()
);
}
else
{
throw
new
CleaBadRequestException
(
message
);
}
}
private
Visit
toVisitNullSafe
(
fr
.
gouv
.
clea
.
ws
.
api
.
model
.
Visit
visit
)
{
...
...
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