use of com.furyviewer.domain.RateSeries in project FuryViewer by TheDoctor-95.
the class RateSeriesResource method updateRateSeries.
/**
* PUT /rate-series : Updates an existing rateSeries.
*
* @param rateSeries the rateSeries to update
* @return the ResponseEntity with status 200 (OK) and with body the updated rateSeries,
* or with status 400 (Bad Request) if the rateSeries is not valid,
* or with status 500 (Internal Server Error) if the rateSeries couldn't be updated
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PutMapping("/rate-series")
@Timed
public ResponseEntity<RateSeries> updateRateSeries(@RequestBody RateSeries rateSeries) throws URISyntaxException {
log.debug("REST request to update RateSeries : {}", rateSeries);
if (rateSeries.getId() == null) {
return createRateSeries(rateSeries);
}
RateSeries result = rateSeriesRepository.save(rateSeries);
return ResponseEntity.ok().headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, rateSeries.getId().toString())).body(result);
}
Aggregations