fix: Entry renamed to Average
This commit is contained in:
parent
625dd63137
commit
f63604a18a
4 changed files with 8 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
package eu.ztsh.lfr.web;
|
||||
|
||||
import eu.ztsh.lfr.core.TemperaturesService;
|
||||
import eu.ztsh.lfr.model.Entry;
|
||||
import eu.ztsh.lfr.model.Average;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -23,7 +23,7 @@ public class TemperaturesController {
|
|||
}
|
||||
|
||||
@GetMapping("/{city}")
|
||||
public ResponseEntity<List<Entry>> getTemperatures(@PathVariable String city) {
|
||||
public ResponseEntity<List<Average>> getTemperatures(@PathVariable String city) {
|
||||
var data = temperaturesService.getTemperaturesFor(city);
|
||||
|
||||
return data.isEmpty() ? ResponseEntity.notFound().build() : ResponseEntity.ok(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue