projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a property for “requiresLogin” instead of a method
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
ajax
/
DistrustAjaxPage.kt
diff --git
a/src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt
b/src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt
index
1c3506b
..
e4f8435
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt
@@
-16,12
+16,12
@@
class DistrustAjaxPage(webInterface: WebInterface) : LoggedInJsonPage("distrustS
override fun createJsonObject(currentSone: Sone, request: FreenetRequest) =
request.parameters["sone"]
override fun createJsonObject(currentSone: Sone, request: FreenetRequest) =
request.parameters["sone"]
- .let(
webInterface.
core::getSone)
+ .let(core::getSone)
?.let { sone ->
createSuccessJsonObject()
?.let { sone ->
createSuccessJsonObject()
- .put("trustValue",
webInterface.
core.preferences.negativeTrust)
+ .put("trustValue", core.preferences.negativeTrust)
.also {
.also {
-
webInterface.
core.distrustSone(currentSone, sone)
+ core.distrustSone(currentSone, sone)
}
} ?: createErrorJsonObject("invalid-sone-id")
}
} ?: createErrorJsonObject("invalid-sone-id")