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