- override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) {
- if (request.isPOST) {
- getCurrentSone(request.toadletContext)!!.let { currentSone ->
- request.parameters["type", 16]?.also { type ->
- when(type) {
- "post" -> currentSone.addLikedPostId(request.parameters["post", 36]!!)
- "reply" -> currentSone.addLikedReplyId(request.parameters["reply", 36]!!)
- }
+ override fun handleRequest(freenetRequest: FreenetRequest, currentSone: Sone, templateContext: TemplateContext) {
+ if (freenetRequest.isPOST) {
+ freenetRequest.parameters["type", 16]?.also { type ->
+ when (type) {
+ "post" -> currentSone.addLikedPostId(freenetRequest.parameters["post", 36]!!)
+ "reply" -> currentSone.addLikedReplyId(freenetRequest.parameters["reply", 36]!!)