Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vendelieu authored Nov 13, 2023
1 parent f4d3242 commit d12f5e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ fun getAllUserDocuments(userId: Long) = getAll {
DOCUMENT.USER_ID.eq(userId)
}

fun create(uuid: String): User = create { this.uuid = uuid.toUuid() }
fun create(uuid: String): User = create { this.uuid = uuid }

fun get(uuid: String): User = getOne { USER.UUID.eq(uuid.toUuid()) } ?: create(uuid)
fun get(uuid: String): User = getOne { USER.UUID.eq(uuid) } ?: create(uuid)

fun update(uuid: String, block: User.() -> Unit): User? = update(USER.UUID.eq(uuid.toUuid()), block)
fun update(uuid: String, block: User.() -> Unit): User? = update(USER.UUID.eq(uuid), block)

fun countUsers(userUuid: String) = count {
fun countUsers() = count {
USER.CREATED_AT.lt(Instant.now())
}
```
Expand Down

0 comments on commit d12f5e4

Please sign in to comment.