Skip to content

Commit 2d2b5fc

Browse files
author
querwurzel
committed
updates
1 parent 4c7c79c commit 2d2b5fc

File tree

6 files changed

+28
-38
lines changed

6 files changed

+28
-38
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
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'

.mvn/wrapper/maven-wrapper.jar

65 Bytes
Binary file not shown.
Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
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
182
distributionType=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

mvnw

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/org/mersenne/primenet/imports/api/ResultController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/main/java/org/mersenne/primenet/meta/api/MetaController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
import org.mersenne.primenet.meta.application.MetaService;
44
import org.mersenne.primenet.meta.application.model.MetaInformation;
55
import org.springframework.beans.factory.annotation.Autowired;
6-
import org.springframework.http.HttpStatus;
76
import org.springframework.http.MediaType;
7+
import org.springframework.http.ResponseEntity;
88
import org.springframework.web.bind.annotation.GetMapping;
99
import org.springframework.web.bind.annotation.RequestMapping;
1010
import 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
}

0 commit comments

Comments
 (0)