Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #175 from Z-Jais/master
Browse files Browse the repository at this point in the history
Invalidation of Episode Service after Anime updates
  • Loading branch information
Ziedelth authored Oct 4, 2023
2 parents 20d4baa + 0acbd25 commit 5824279
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/fr/ziedelth/controllers/AnimeController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class AnimeController : AttachmentController<Anime>("/animes") {

savedAnime = animeRepository.save(savedAnime)
animeService.invalidateAll()
episodeService.invalidateAll()
call.respond(HttpStatusCode.OK, savedAnime)
} catch (e: Exception) {
printError(call, e)
Expand All @@ -188,6 +189,7 @@ class AnimeController : AttachmentController<Anime>("/animes") {

animeRepository.delete(savedAnime)
animeService.invalidateAll()
episodeService.invalidateAll()
call.respond(HttpStatusCode.NoContent)
} catch (e: Exception) {
printError(call, e)
Expand Down

0 comments on commit 5824279

Please sign in to comment.