add teleporting

This commit is contained in:
Daniel Goc
2026-03-31 16:56:05 +02:00
parent a3f01eca7c
commit 55da953f32
14 changed files with 142 additions and 86 deletions

View File

@@ -82,6 +82,15 @@ type UserSession struct {
IsActive bool `json:"is_active"`
}
type UserLocale struct {
// User is the Target user if present, otherwise same as Original.
// User ought to be used in applications
User *Customer
// Original user is the one associated with auth token
OriginalUser *Customer
// Importantly, lang_id used in application is stored as OriginalUser.LangID
}
// ToSession converts User to UserSession
func (u *Customer) ToSession() *UserSession {
return &UserSession{
@@ -98,6 +107,7 @@ func (u *Customer) ToSession() *UserSession {
type LoginRequest struct {
Email string `json:"email" form:"email"`
Password string `json:"password" form:"password"`
LangID *uint `json:"lang_id" form:"lang_id"`
}
// RegisterRequest represents the initial registration form data