mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
changed the /api/v1/regattas/{regattaname}/races/{racename}/wind webservice so that a fromTime and toTime is mandatory
This commit is contained in:
1 parent
fc42688d0f
commit
5caddd9e57
2 files changed
+8
-8
No files matched your search
+6
-2
@@ -687,8 +687,12 @@ public class RegattasResource extends AbstractSailingServerResource {
|
||||
Regatta regatta = findRegattaByName(regattaName);
|
||||
if (regatta == null) {
|
||||
response = Response.status(Status.NOT_FOUND)
|
||||
.entity("Could not find a regatta with name '" + StringEscapeUtils.escapeHtml(regattaName) + "'.").type(MediaType.TEXT_PLAIN)
|
||||
.build();
|
||||
.entity("Could not find a regatta with name '" + StringEscapeUtils.escapeHtml(regattaName) + "'.").type(MediaType.TEXT_PLAIN)
|
||||
.build();
|
||||
} else if (!((fromtime != null && totime != null) || (fromtimeasmillis != null && totimeasmillis != null))) {
|
||||
response = Response.status(Status.NOT_FOUND)
|
||||
.entity("Either the 'fromtime' and 'totime' or the 'fromtimeasmillis' and 'totimeasmillis' parameter must be set.").type(MediaType.TEXT_PLAIN)
|
||||
.build();
|
||||
} else {
|
||||
RaceDefinition race = findRaceByName(regatta, raceName);
|
||||
if (race == null) {
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
<tr>
|
||||
<td>Mandatory parameters:</td>
|
||||
<td>
|
||||
<div>regattaname</div>
|
||||
<div>racename</div>
|
||||
<div>fromtime (ISO format, such as 2014-02-14T10:12:03Z) or fromtimeasmillis (time in milliseconds)</div>
|
||||
<div>totime (ISO format, such as 2014-02-14T10:12:03Z) or totimeasmillis (time in milliseconds)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -35,10 +35,6 @@
|
||||
<td>
|
||||
<div>windsource [COMBINED = Default, WEB, EXPEDITION, TRACK_BASED_ESTIMATION, COURSE_BASED, RACECOMMITTEE]</div>
|
||||
<div>windsourceid (Id of a wind source. For example Igtimi wind sources will have the type=EXPEDITION but each of them has unique ids. If you want to filter by these then you can use this parameter)</div>
|
||||
<div>fromtime (ISO format, such as 2014-02-14T10:12:03Z)</div>
|
||||
<div>fromtimeasmillis</div>
|
||||
<div>totime (ISO format, such as 2014-02-14T10:12:03Z)</div>
|
||||
<div>totimeasmillis</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in new issue
Block a user