Implement FCM

This commit is contained in:
2026-05-09 14:11:21 +07:00
parent 07b186c986
commit 6a2ce75a8e
18 changed files with 397 additions and 44 deletions
+14
View File
@@ -253,3 +253,17 @@ func (p *UserProcessorImpl) UpdateUserOutlet(ctx context.Context, userID uuid.UU
return mappers.UserEntityToResponse(existingUser), nil
}
func (p *UserProcessorImpl) UpdateFcmToken(ctx context.Context, userID uuid.UUID, fcmToken string) error {
_, err := p.userRepo.GetByID(ctx, userID)
if err != nil {
return fmt.Errorf("user not found: %w", err)
}
err = p.userRepo.UpdateFcmToken(ctx, userID, fcmToken)
if err != nil {
return fmt.Errorf("failed to update FCM token: %w", err)
}
return nil
}