parent
cfb6ac8e5f
commit
228a710f1e
|
|
@ -117,7 +117,7 @@ public struct AdminController<User: ManagedUser>: Sendable where User.SessionID
|
|||
let save = try request.content.decode(Save.self)
|
||||
|
||||
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)
|
||||
}
|
||||
guard !save.email.isEmpty && !save.fullname.isEmpty else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue