Kotlin 2.0.0 cleanups
This commit is contained in:
parent
086c736b9e
commit
c3c4ae20ad
2 changed files with 2 additions and 4 deletions
|
@ -61,7 +61,7 @@ open class Akismet(apiKey: String) {
|
|||
*/
|
||||
@JvmStatic
|
||||
fun jsonComment(json: String): AkismetComment {
|
||||
return Json.decodeFromString(AkismetComment.serializer(), json)
|
||||
return Json.decodeFromString<AkismetComment>(json)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
|
||||
package net.thauvin.erik.akismet
|
||||
|
||||
import net.thauvin.erik.akismet.AkismetComment.Companion.ADMIN_ROLE
|
||||
|
||||
/**
|
||||
* Provides a comment configuration.
|
||||
*/
|
||||
|
@ -169,7 +167,7 @@ class CommentConfig private constructor(builder: Builder) {
|
|||
/**
|
||||
* Set the user role of the user who submitted the comment. This is an optional parameter.
|
||||
*
|
||||
* If you set it to [ADMIN_ROLE], Akismet will always return `false`.
|
||||
* If you set it to [AkismetComment.ADMIN_ROLE], Akismet will always return `false`.
|
||||
*/
|
||||
fun userRole(userRole: String): Builder = apply { this.userRole = userRole }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue