feat: Fixes signup flow, begins updating form input fields.

This commit is contained in:
2026-01-12 18:53:45 -05:00
parent c2aedfac1a
commit fa9e8cffb0
10 changed files with 211 additions and 124 deletions

View File

@@ -9,6 +9,7 @@ extension DatabaseClient {
public struct UserProfile: Sendable {
public var create: @Sendable (User.Profile.Create) async throws -> User.Profile
public var delete: @Sendable (User.Profile.ID) async throws -> Void
public var fetch: @Sendable (User.ID) async throws -> User.Profile?
public var get: @Sendable (User.Profile.ID) async throws -> User.Profile?
public var update: @Sendable (User.Profile.ID, User.Profile.Update) async throws -> User.Profile
}
@@ -32,6 +33,13 @@ extension DatabaseClient.UserProfile: TestDependencyKey {
}
try await model.delete(on: database)
},
fetch: { userID in
try await UserProfileModel.query(on: database)
.with(\.$user)
.filter(\.$user.$id == userID)
.first()
.map { try $0.toDTO() }
},
get: { id in
try await UserProfileModel.find(id, on: database)
.map { try $0.toDTO() }