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