projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test for DI constructability of BookmarksPage
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
ajax
/
FollowSoneAjaxPage.kt
diff --git
a/src/main/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.kt
b/src/main/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.kt
index
b37b48a
..
0c37ac0
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPage.kt
@@
-14,9
+14,9
@@
class FollowSoneAjaxPage(webInterface: WebInterface) : LoggedInJsonPage("followS
override fun createJsonObject(currentSone: Sone, request: FreenetRequest) =
request.parameters["sone"]
override fun createJsonObject(currentSone: Sone, request: FreenetRequest) =
request.parameters["sone"]
-
.let(webInterface.
core::getSone)
- ?.also {
webInterface.
core.followSone(currentSone, it.id) }
- ?.also(
webInterface.
core::markSoneKnown)
+
?.let(
core::getSone)
+ ?.also { core.followSone(currentSone, it.id) }
+ ?.also(core::markSoneKnown)
?.let { createSuccessJsonObject() }
?: createErrorJsonObject("invalid-sone-id")
?.let { createSuccessJsonObject() }
?: createErrorJsonObject("invalid-sone-id")