X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FEditAlbumAjaxPage.kt;h=9cb3acf951d07b95a5d1edbd54b9935d8a10d5b5;hp=cf12b3354490b126f731c2bed1eb70938bc1eb3d;hb=9db5ef551b000dc6e9b6f6683a2cce3b8e2f5223;hpb=47dc11af1a7bbca09c04239edee33f83d6539b81 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditAlbumAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditAlbumAjaxPage.kt index cf12b33..9cb3acf 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditAlbumAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditAlbumAjaxPage.kt @@ -6,15 +6,16 @@ import net.pterodactylus.sone.utils.ifTrue import net.pterodactylus.sone.utils.parameters import net.pterodactylus.sone.web.WebInterface import net.pterodactylus.sone.web.page.FreenetRequest +import javax.inject.Inject /** * Page that stores a user’s album modifications. */ -class EditAlbumAjaxPage(webInterface: WebInterface) : JsonPage("editAlbum.ajax", webInterface) { +class EditAlbumAjaxPage @Inject constructor(webInterface: WebInterface) : JsonPage("editAlbum.ajax", webInterface) { override fun createJsonObject(request: FreenetRequest) = request.parameters["album"]!! - .let(webInterface.core::getAlbum) + .let(core::getAlbum) ?.let { album -> album.sone.isLocal.ifTrue { when {