upgrade kotlin, ktor, sendgrid

This commit is contained in:
2021-01-18 17:13:24 +01:00
parent 4b435b925e
commit a79e1ec086
69 changed files with 152 additions and 117 deletions

View File

@@ -33,10 +33,10 @@ class ArticleVoter(private val articleRepo: ArticleRepository) : Voter() {
/* The new Article must by created by the same citizen of the connected citizen */
if (subject.createdBy.id == citizen.id) {
/* The creator must be the same of the creator of preview version of article */
val lastVersionId = articleRepo
.findVersionsByVersionId(1, 1, subject.versionId)
.result
.firstOrNull()?.createdBy?.id
val lastVersionId = articleRepo
.findVersionsByVersionId(1, 1, subject.versionId)
.result
.firstOrNull()?.createdBy?.id
return when (lastVersionId) {
null -> granted("You can create a new Article")
@@ -46,4 +46,4 @@ class ArticleVoter(private val articleRepo: ArticleRepository) : Voter() {
}
return denied("This article must be yours for update it", "article.update.notYours")
}
}
}