Fix linting warnings
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
package be.simplenotes.persistance.notes
|
||||
|
||||
import be.simplenotes.domain.model.Note
|
||||
@@ -45,7 +47,8 @@ internal interface NoteEntity : Entity<NoteEntity> {
|
||||
|
||||
internal fun NoteEntity.toPersistedMetadata(tags: List<String>) = PersistedNoteMetadata(title, tags, updatedAt, uuid)
|
||||
|
||||
internal fun NoteEntity.toPersistedNote(tags: List<String>) = PersistedNote(NoteMetadata(title, tags), markdown, html, updatedAt, uuid)
|
||||
internal fun NoteEntity.toPersistedNote(tags: List<String>) =
|
||||
PersistedNote(NoteMetadata(title, tags), markdown, html, updatedAt, uuid)
|
||||
|
||||
internal fun Note.toEntity(uuid: UUID, userId: Int): NoteEntity {
|
||||
val note = this
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package be.simplenotes.persistance.users
|
||||
|
||||
import be.simplenotes.domain.model.PersistedUser
|
||||
import be.simplenotes.domain.model.User
|
||||
import me.liuwj.ktorm.database.*
|
||||
import me.liuwj.ktorm.entity.*
|
||||
import me.liuwj.ktorm.schema.*
|
||||
@@ -26,12 +25,4 @@ internal interface UserEntity : Entity<UserEntity> {
|
||||
|
||||
internal fun UserEntity.toPersistedUser() = PersistedUser(username, password, id)
|
||||
|
||||
internal fun User.toEntity(): UserEntity {
|
||||
val user = this
|
||||
return UserEntity {
|
||||
this.username = user.username
|
||||
this.password = user.password
|
||||
}
|
||||
}
|
||||
|
||||
internal val Database.users get() = this.sequenceOf(Users, withReferences = false)
|
||||
|
||||
Reference in New Issue
Block a user