- override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) {
- if (request.isPOST) {
- when (request.parameters["type"]) {
- "post" -> getCurrentSone(request.toadletContext)!!.removeLikedPostId(request.parameters["post"]!!)
- "reply" -> getCurrentSone(request.toadletContext)!!.removeLikedReplyId(request.parameters["reply"]!!)
+ override fun handleRequest(freenetRequest: FreenetRequest, currentSone: Sone, templateContext: TemplateContext) {
+ if (freenetRequest.isPOST) {
+ when (freenetRequest.parameters["type"]) {
+ "post" -> currentSone.removeLikedPostId(freenetRequest.parameters["post"]!!)
+ "reply" -> currentSone.removeLikedReplyId(freenetRequest.parameters["reply"]!!)