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