Improve source handling, fix errors with uninitialized mangas in broken sources (#319)

This commit is contained in:
Mitchell Syer
2022-03-22 07:21:07 -04:00
committed by GitHub
parent a27af0b642
commit 152b193ad5
6 changed files with 59 additions and 56 deletions

View File

@@ -29,7 +29,7 @@ object SourceController {
/** fetch source with id `sourceId` */
fun retrieve(ctx: Context) {
val sourceId = ctx.pathParam("sourceId").toLong()
ctx.json(Source.getSource(sourceId))
ctx.json(Source.getSource(sourceId)!!)
}
/** popular mangas from source with id `sourceId` */