feat: implement Phase 2 - Equipment Management and Training Zones

This commit is contained in:
Cipher Vance
2025-11-22 19:51:16 -06:00
parent c680333ef6
commit d6b91acdda
9 changed files with 548 additions and 17 deletions

View File

@@ -144,6 +144,16 @@ func (s *Service) ResetPassword(token, newPassword string) error {
return tx.Commit().Error
}
// GetUserByID retrieves a user with their profile
func (s *Service) GetUserByID(userID uint) (*User, error) {
return s.repo.GetUserByID(userID)
}
// UpdateUser saves user changes
func (s *Service) UpdateUser(user *User) error {
return s.repo.UpdateUser(user)
}
// Helper functions
func isValidEmail(email string) bool {
regex := regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`)