diff --git a/Sources/ManageableUsers/Controllers/AdminController.swift b/Sources/ManageableUsers/Controllers/AdminController.swift index afac3d0..804a856 100644 --- a/Sources/ManageableUsers/Controllers/AdminController.swift +++ b/Sources/ManageableUsers/Controllers/AdminController.swift @@ -117,7 +117,7 @@ public struct AdminController: 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 {