Allow save of inactive users.

main 1.1.1
Johan Carlberg 2026-01-25 12:02:19 +01:00
parent cfb6ac8e5f
commit 228a710f1e
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ public struct AdminController<User: ManagedUser>: Sendable where User.SessionID
let save = try request.content.decode(Save.self) let save = try request.content.decode(Save.self)
return try await request.db.withSQLConnection (user: try request.auth.require (BasicUser.self)) { connection in return try await request.db.withSQLConnection (user: try request.auth.require (BasicUser.self)) { connection in
guard (try await User.find (userId, on: connection)) != nil else { guard (try await User.fetch (userId, on: connection)) != nil else {
throw Abort (.notFound) throw Abort (.notFound)
} }
guard !save.email.isEmpty && !save.fullname.isEmpty else { guard !save.email.isEmpty && !save.fullname.isEmpty else {