File tree Expand file tree Collapse file tree 6 files changed +28
-38
lines changed
src/main/java/org/mersenne/primenet Expand file tree Collapse file tree 6 files changed +28
-38
lines changed Original file line number Diff line number Diff line change 77 runs-on : ubuntu-latest
88 steps :
99 - name : Checkout repository
10- uses : actions/checkout@v4
10+ uses : actions/checkout@v5
1111
1212 - name : Set up JDK
13- uses : actions/setup-java@v4
13+ uses : actions/setup-java@v5
1414 with :
1515 distribution : ' temurin'
1616 java-version : ' 21'
Original file line number Diff line number Diff line change 1- # Licensed to the Apache Software Foundation (ASF) under one
2- # or more contributor license agreements. See the NOTICE file
3- # distributed with this work for additional information
4- # regarding copyright ownership. The ASF licenses this file
5- # to you under the Apache License, Version 2.0 (the
6- # "License"); you may not use this file except in compliance
7- # with the License. You may obtain a copy of the License at
8- #
9- # http://www.apache.org/licenses/LICENSE-2.0
10- #
11- # Unless required by applicable law or agreed to in writing,
12- # software distributed under the License is distributed on an
13- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14- # KIND, either express or implied. See the License for the
15- # specific language governing permissions and limitations
16- # under the License.
17- wrapperVersion =3.3.2
1+ wrapperVersion =3.3.4
182distributionType =bin
19- distributionUrl =https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9 /apache-maven-3.9.9 -bin.zip
20- wrapperUrl =https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2 /maven-wrapper-3.3.2 .jar
3+ distributionUrl =https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11 /apache-maven-3.9.11 -bin.zip
4+ wrapperUrl =https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4 /maven-wrapper-3.3.4 .jar
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public ResultController(ResultService resultService) {
2626
2727 @ CrossOrigin
2828 @ GetMapping (produces = MediaType .APPLICATION_JSON_VALUE )
29- public ResponseEntity <Results > getMyRecentResults () {
29+ ResponseEntity <Results > getMyRecentResults () {
3030 final List <Result > results = resultService .fetchRecentResults ();
3131 return new ResponseEntity <>(new Results (results ), HttpStatus .OK );
3232 }
Original file line number Diff line number Diff line change 33import org .mersenne .primenet .meta .application .MetaService ;
44import org .mersenne .primenet .meta .application .model .MetaInformation ;
55import org .springframework .beans .factory .annotation .Autowired ;
6- import org .springframework .http .HttpStatus ;
76import org .springframework .http .MediaType ;
7+ import org .springframework .http .ResponseEntity ;
88import org .springframework .web .bind .annotation .GetMapping ;
99import org .springframework .web .bind .annotation .RequestMapping ;
1010import org .springframework .web .bind .annotation .RestController ;
11- import org .springframework .web .server .ResponseStatusException ;
1211
1312@ RestController
1413@ RequestMapping ("/results/meta" )
@@ -22,8 +21,9 @@ public MetaController(MetaService metaService) {
2221 }
2322
2423 @ GetMapping (produces = MediaType .APPLICATION_JSON_VALUE )
25- public MetaInformation getMetaInformation () {
24+ ResponseEntity < MetaInformation > getMetaInformation () {
2625 return metaService .getMeta ()
27- .orElseThrow (() -> new ResponseStatusException (HttpStatus .NO_CONTENT ));
26+ .map (ResponseEntity ::ok )
27+ .orElse (ResponseEntity .noContent ().build ());
2828 }
2929}
You can’t perform that action at this time.
0 commit comments