feat: initial wip frontend

This commit is contained in:
Stavros
2026-04-28 19:11:36 +03:00
parent a5677d2558
commit 3971710e87
7 changed files with 158 additions and 12 deletions
+15 -10
View File
@@ -11,16 +11,17 @@ import (
)
type UserContextResponse struct {
Status int `json:"status"`
Message string `json:"message"`
IsLoggedIn bool `json:"isLoggedIn"`
Username string `json:"username"`
Name string `json:"name"`
Email string `json:"email"`
Provider string `json:"provider"`
OAuth bool `json:"oauth"`
TotpPending bool `json:"totpPending"`
OAuthName string `json:"oauthName"`
Status int `json:"status"`
Message string `json:"message"`
IsLoggedIn bool `json:"isLoggedIn"`
Username string `json:"username"`
Name string `json:"name"`
Email string `json:"email"`
Provider string `json:"provider"`
OAuth bool `json:"oauth"`
TotpPending bool `json:"totpPending"`
OAuthName string `json:"oauthName"`
TailscaleNodeName string `json:"tailscaleNodeName"`
}
type AppContextResponse struct {
@@ -91,6 +92,10 @@ func (controller *ContextController) userContextHandler(c *gin.Context) {
OAuthName: context.OAuthName,
}
if context.Tailscale != nil {
userContext.TailscaleNodeName = context.Tailscale.NodeName
}
if err != nil {
tlog.App.Debug().Err(err).Msg("No user context found in request")
userContext.Status = 401