chore(auth): add test for retrieving session from db #181
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 46s
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 46s
This commit is contained in:
@@ -2,9 +2,20 @@ package types
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
type SessionId string
|
||||
|
||||
type User struct {
|
||||
Id uuid.UUID
|
||||
Email string
|
||||
SessionId string
|
||||
SessionId SessionId
|
||||
EmailVerified bool
|
||||
}
|
||||
|
||||
func NewUser(id uuid.UUID, email string, sessionId SessionId, emailVerified bool) *User {
|
||||
return &User{
|
||||
Id: id,
|
||||
Email: email,
|
||||
SessionId: sessionId,
|
||||
EmailVerified: emailVerified,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user