- 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(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) {
+ if (soneRequest.isPOST) {
+ when (soneRequest.parameters["type"]) {
+ "post" -> currentSone.removeLikedPostId(soneRequest.parameters["post"]!!)
+ "reply" -> currentSone.removeLikedReplyId(soneRequest.parameters["reply"]!!)