X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FEditImageAjaxPage.kt;h=dbeb2d27f416de015a95b66ca6166723bf821e18;hp=ee2cf19665fa3cbd5eaca814bb76127b52119293;hb=85b7420f3492af4e5591f62ad673309a76de7e04;hpb=77ada453ff332d62adb0a7820e428f6a0030093f diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.kt index ee2cf19..dbeb2d2 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.kt @@ -21,19 +21,19 @@ class EditImageAjaxPage(webInterface: WebInterface, override fun createJsonObject(request: FreenetRequest) = request.parameters["image"] - .let(webInterface.core::getImage) + .let(core::getImage) ?.let { image -> image.sone.isLocal.ifTrue { when { request.parameters["moveLeft"] == "true" -> createSuccessJsonObject().apply { put("sourceImageId", image.id) put("destinationImageId", image.album.moveImageUp(image).id) - webInterface.core.touchConfiguration() + core.touchConfiguration() } request.parameters["moveRight"] == "true" -> createSuccessJsonObject().apply { put("sourceImageId", image.id) put("destinationImageId", image.album.moveImageDown(image).id) - webInterface.core.touchConfiguration() + core.touchConfiguration() } else -> request.parameters["title"]!!.let { title -> title.trim().isNotBlank().ifTrue { @@ -52,7 +52,7 @@ class EditImageAjaxPage(webInterface: WebInterface, } } }) - webInterface.core.touchConfiguration() + core.touchConfiguration() } } }