new file: begushiybashkir/bbvue/public/images/locations/1mayPark.webp

new file:   begushiybashkir/bbvue/public/images/locations/dinamo.jpg
	new file:   begushiybashkir/bbvue/public/images/locations/riverSide.jpeg
	modified:   begushiybashkir/bbvue/src/views/Training.vue
	modified:   serv_nginx/api_bb/internal/handlers/handler_util.go
	modified:   serv_nginx/api_bb/internal/handlers/user.go
	modified:   serv_nginx/api_bb/internal/routes/routes.go
	modified:   serv_nginx/api_bb/internal/service/auth_service.go
	modified:   serv_nginx/api_bb/internal/service/user_service.go
add photo location into trainings page
This commit is contained in:
2025-10-12 16:55:55 +05:00
parent ebe43e6617
commit 12f805f9e1
9 changed files with 124 additions and 96 deletions
@@ -15,8 +15,6 @@ import (
type AuthService interface {
Register(user *models.User) error
Login(email, password string) (*models.User, string, error)
GetUserProfile(userID uint) (*models.User, error)
UpdateProfile(user *models.User) error
}
type authService struct {
@@ -21,11 +21,17 @@ type userService struct {
logger logger.Interface
}
func NewUserService(userRepo repository.UserRepository, jwtService JWTService, log logger.Interface) AuthService {
// Создаем логгер с контекстом для сервиса
serviceLogger := log.With(zap.String("service", "auth"))
return &authService{
// UpdateProfile implements UserService.
func (s userService) UpdateProfile(user *models.User) error {
panic("unimplemented")
}
func NewUserService(userRepo repository.UserRepository, jwtService JWTService, log logger.Interface) userService {
// Создаем логгер с контекстом для сервиса
serviceLogger := log.With(zap.String("service", "user"))
return userService{
userRepo: userRepo,
jwtService: jwtService,
logger: serviceLogger,
@@ -64,7 +70,7 @@ func (s *authService) UpdateProfile(user *models.User) error {
return s.userRepo.UpdateExcludeEmail(updateData)
}
func (s *authService) GetUserProfile(userID uint) (*models.User, error) {
func (s *userService) GetUserProfile(userID uint) (*models.User, error) {
s.logger.Debug("Getting user profile",
zap.Uint("user_id", userID),
)