Migrate easysite from api_es to api_yal
- Remove api_es service, Dockerfile, all Go source files - Remove api_es from docker-compose.yml, nginx-ssl.conf, .env, Makefile - Replace nginx /api/ proxy with /api/v1/ → api_yal:8787 - Add amenity/upload domains, AuthResponse, GET /auth/me, GET /objects/my to api_yal - Rewrite easysite frontend: types, composables, and all 5 pages to use api_yal DTOs - Wire nuxt.config public.apiBase, add useObjects CRUD composable - Update docs references from api_es to api_yal
This commit is contained in:
@@ -23,6 +23,7 @@ type AuthService interface {
|
||||
Logout(userID uint) error
|
||||
ValidateAccessToken(tokenString string) (*jwt.MapClaims, error)
|
||||
GetUserFromToken(claims *jwt.MapClaims) (*models.Account, error)
|
||||
GetUserFromID(userID uint) (*models.Account, error)
|
||||
|
||||
// Reset password methods
|
||||
RequestPasswordReset(email string) (string, error) // Возвращает reset token
|
||||
@@ -381,6 +382,11 @@ func (s *authServiceImpl) GetUserFromToken(claims *jwt.MapClaims) (*models.Accou
|
||||
return s.accountRepo.GetByID(userID)
|
||||
}
|
||||
|
||||
// GetUserFromID получает пользователя по ID
|
||||
func (s *authServiceImpl) GetUserFromID(userID uint) (*models.Account, error) {
|
||||
return s.accountRepo.GetByID(userID)
|
||||
}
|
||||
|
||||
// generateAccessToken генерирует access token
|
||||
func (s *authServiceImpl) generateAccessToken(account *models.Account) (string, time.Time, error) {
|
||||
expiresAt := time.Now().Add(s.accessTokenTTL)
|
||||
|
||||
Reference in New Issue
Block a user