chore: add lab5 files and merge env.example.

This commit is contained in:
Голиков Maximillian Антон
2026-11-14 16:12:32 +03:00
parent 470d9d6f1e
commit 0d1a4261f8
93 changed files with 7085 additions and 11 deletions
+21
View File
@@ -0,0 +1,21 @@
package dto
import (
"high-loud-apps-labs/internal/domain"
)
type SessionResponse struct {
Token string `json:"token"`
TokenType string `json:"token_type"`
ExpiresAt string `json:"expires_at"`
User UserResponse `json:"user"`
}
func SessionResponseFromDomain(s *domain.Session, token string, u *domain.User) SessionResponse {
return SessionResponse{
Token: token,
TokenType: "Bearer",
ExpiresAt: s.ExpiresAt.UTC().Format(timeFormat),
User: UserFromDomain(u),
}
}