Updated examples.
This commit is contained in:
parent
149bbff4ae
commit
1e0de8b920
4 changed files with 13 additions and 7 deletions
|
@ -13,7 +13,13 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("net.thauvin.erik:akismet-kotlin:0.9.0-beta")
|
||||
// Align versions of all Kotlin components
|
||||
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
|
||||
implementation(kotlin("stdlib"))
|
||||
|
||||
implementation("javax.servlet:javax.servlet-api:4.0.1")
|
||||
|
||||
implementation("net.thauvin.erik:akismet-kotlin:0.9.1-beta")
|
||||
}
|
||||
|
||||
application {
|
||||
|
|
|
@ -20,7 +20,7 @@ public class AkismetSample {
|
|||
comment.setAuthorUrl("http://www.CheckOutMyCoolSite.com");
|
||||
comment.setDateGmt(Akismet.dateToGmt(new Date()));
|
||||
// comment.setUserRole(AkismetComment.ADMIN_ROLE);
|
||||
comment.setContent("It means a lot that you would take the time to review our software. Thanks again.");
|
||||
comment.setContent("It means a lot that you would take the time to review our software. Thanks again.");
|
||||
|
||||
// final ConsoleHandler consoleHandler = new ConsoleHandler();
|
||||
// consoleHandler.setLevel(Level.FINE);
|
||||
|
|
|
@ -20,7 +20,7 @@ fun main() {
|
|||
authorUrl = "http://www.CheckOutMyCoolSite.com"
|
||||
dateGmt = Akismet.dateToGmt(Date())
|
||||
// userRole = AkismetComment.ADMIN_ROLE
|
||||
content = "It means a lot that you would take the time to review our software. Thanks again."
|
||||
content = "It means a lot that you would take the time to review our software. Thanks again."
|
||||
}
|
||||
|
||||
// with(akismet.logger) {
|
||||
|
|
|
@ -48,10 +48,10 @@ class AkismetServlet : HttpServlet() {
|
|||
@Suppress("UNUSED_PARAMETER")
|
||||
private fun saveComment(
|
||||
id: String,
|
||||
name: String,
|
||||
email: String,
|
||||
date: String,
|
||||
comment: String,
|
||||
name: String?,
|
||||
email: String?,
|
||||
date: String?,
|
||||
comment: String?,
|
||||
json: String,
|
||||
isSpam: Boolean
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue