This commit is contained in:
2021-01-14 22:53:48 +01:00
parent 91ab800272
commit caadc2a969
29 changed files with 50 additions and 56 deletions

View File

@@ -35,7 +35,7 @@ class CommentForView<T : TargetI, C : CitizenRef>(
)
}
open class CommentForUpdate<T : TargetI, C: CitizenRef>(
open class CommentForUpdate<T : TargetI, C : CitizenRef>(
override val id: UUID = UUID.randomUUID(),
override val createdBy: C,
override val target: T,
@@ -61,14 +61,14 @@ open class CommentForUpdate<T : TargetI, C: CitizenRef>(
)
}
open class CommentParent<T: TargetI>(
open class CommentParent<T : TargetI>(
override val id: UUID,
override val deletedAt: DateTime?,
override val target: T
) : CommentRef(id),
CommentParentI<T>
interface CommentParentI<T: TargetI> : CommentI, EntityDeletedAt, CommentWithTargetI<T>
interface CommentParentI<T : TargetI> : CommentI, EntityDeletedAt, CommentWithTargetI<T>
interface CommentWithTargetI<T : TargetI> : CommentI, TargetI, AsTarget<T>

View File

@@ -67,7 +67,7 @@ abstract class CommentRepositoryAbs<T : TargetI>(override var requester: Request
}
}
fun <I : T, C: CitizenRef> comment(comment: CommentForUpdate<I, C>) {
fun <I : T, C : CitizenRef> comment(comment: CommentForUpdate<I, C>) {
requester
.getFunction("comment")
.sendQuery(

View File

@@ -23,7 +23,6 @@ class CommentChildrenRequest(
val limit: Int = if (limit > 50) 50 else if (limit < 1) 1 else limit
}
@KtorExperimentalAPI
@KtorExperimentalLocationsAPI
fun Route.getChildrenComments(repo: CommentRepository) {

View File

@@ -16,7 +16,6 @@ import io.ktor.util.*
@Location("/comments/{comment}")
class CommentRequest(val comment: CommentRef)
@KtorExperimentalAPI
@KtorExperimentalLocationsAPI
fun Route.getOneComment(repo: CommentRepository) {