@@ -117,7 +117,7 @@ class AuthService {
117117 email: email,
118118 isAnonymous: false , // Email verified user is not anonymous
119119 );
120- user = await _userRepository.create (user); // Save the new user
120+ user = await _userRepository.create (item : user); // Save the new user
121121 print ('Created new user: ${user .id }' );
122122 }
123123 } on HtHttpException catch (e) {
@@ -157,7 +157,7 @@ class AuthService {
157157 isAnonymous: true ,
158158 email: null , // Anonymous users don't have an email initially
159159 );
160- user = await _userRepository.create (user);
160+ user = await _userRepository.create (item : user);
161161 print ('Created anonymous user: ${user .id }' );
162162 } on HtHttpException catch (e) {
163163 print ('Error creating anonymous user: $e ' );
@@ -327,8 +327,8 @@ class AuthService {
327327 isAnonymous: false , // Now a permanent user
328328 );
329329 final permanentUser = await _userRepository.update (
330- updatedUser.id,
331- updatedUser,
330+ id : updatedUser.id,
331+ item : updatedUser,
332332 );
333333 print (
334334 'User ${permanentUser .id } successfully linked with email $linkedEmail .' ,
@@ -384,12 +384,12 @@ class AuthService {
384384 Future <void > deleteAccount ({required String userId}) async {
385385 try {
386386 // 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);
388388 print ('[AuthService] Found user ${userToDelete .id } for deletion.' );
389389
390390 // 1. Delete the user record from the repository.
391391 // This implicitly invalidates tokens that rely on user lookup.
392- await _userRepository.delete (userId);
392+ await _userRepository.delete (id : userId);
393393 print ('[AuthService] User ${userToDelete .id } deleted from repository.' );
394394
395395 // 2. Clear any pending verification codes for this user ID (linking).
0 commit comments