Search in sources :

Example 6 with ChapterSeen

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);
}
Also used : ChapterSeen(com.furyviewer.domain.ChapterSeen) Timed(com.codahale.metrics.annotation.Timed)

Aggregations

ChapterSeen (com.furyviewer.domain.ChapterSeen)6 Timed (com.codahale.metrics.annotation.Timed)3 Test (org.junit.Test)3 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)3 Transactional (org.springframework.transaction.annotation.Transactional)3 BadRequestAlertException (com.furyviewer.web.rest.errors.BadRequestAlertException)1 URI (java.net.URI)1