@@ -117,7 +117,7 @@ class AuthService {
117
117
email: email,
118
118
isAnonymous: false , // Email verified user is not anonymous
119
119
);
120
- user = await _userRepository.create (user); // Save the new user
120
+ user = await _userRepository.create (item : user); // Save the new user
121
121
print ('Created new user: ${user .id }' );
122
122
}
123
123
} on HtHttpException catch (e) {
@@ -157,7 +157,7 @@ class AuthService {
157
157
isAnonymous: true ,
158
158
email: null , // Anonymous users don't have an email initially
159
159
);
160
- user = await _userRepository.create (user);
160
+ user = await _userRepository.create (item : user);
161
161
print ('Created anonymous user: ${user .id }' );
162
162
} on HtHttpException catch (e) {
163
163
print ('Error creating anonymous user: $e ' );
@@ -327,8 +327,8 @@ class AuthService {
327
327
isAnonymous: false , // Now a permanent user
328
328
);
329
329
final permanentUser = await _userRepository.update (
330
- updatedUser.id,
331
- updatedUser,
330
+ id : updatedUser.id,
331
+ item : updatedUser,
332
332
);
333
333
print (
334
334
'User ${permanentUser .id } successfully linked with email $linkedEmail .' ,
@@ -384,12 +384,12 @@ class AuthService {
384
384
Future <void > deleteAccount ({required String userId}) async {
385
385
try {
386
386
// Fetch the user first to get their email if needed for cleanup
387
- final userToDelete = await _userRepository.read (userId);
387
+ final userToDelete = await _userRepository.read (id : userId);
388
388
print ('[AuthService] Found user ${userToDelete .id } for deletion.' );
389
389
390
390
// 1. Delete the user record from the repository.
391
391
// This implicitly invalidates tokens that rely on user lookup.
392
- await _userRepository.delete (userId);
392
+ await _userRepository.delete (id : userId);
393
393
print ('[AuthService] User ${userToDelete .id } deleted from repository.' );
394
394
395
395
// 2. Clear any pending verification codes for this user ID (linking).
0 commit comments