Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit 6c59f2c

Browse files
committed
Attempted fix for #4 and #5
1 parent bcc7742 commit 6c59f2c

File tree

1 file changed

+3
-3
lines changed
  • src/main/kotlin/com/kotlindiscord/site/routes/api

1 file changed

+3
-3
lines changed

src/main/kotlin/com/kotlindiscord/site/routes/api/Users.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ val apiUsersPost = apiRoute {
6464
}
6565
} catch (e: EntityNotFoundException) {
6666
newSuspendedTransaction {
67-
logger.info(e) { "Entity not found: ${model.id}" }
67+
logger.debug(e) { "Entity not found: ${model.id}" }
6868

6969
User.new(model.id) {
7070
userName = model.username
7171
discriminator = model.discriminator
7272
avatarUrl = model.avatarUrl
7373
}
74-
}
7574

76-
newSuspendedTransaction { // Exposed has a stupid bug that requires us to add roles after user creation
75+
commit() // Exposed has a stupid bug that requires us to add roles after user creation is committed
76+
7777
val user = User[model.id]
7878
val roles = mutableListOf<Role>()
7979

0 commit comments

Comments
 (0)