Feat rebrand armature (#43)
All checks were successful
CI/CD / detect-changes (push) Successful in 3s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m34s
CI/CD / test-sqlite (push) Successful in 2m46s
CI/CD / build-and-deploy (push) Successful in 1m55s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #43.
This commit is contained in:
2026-03-31 23:25:37 +00:00
committed by xcaliber
parent fb5284f667
commit 680ec3b897
321 changed files with 956 additions and 1033 deletions

View File

@@ -11,9 +11,9 @@ import (
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt/v5"
"switchboard-core/config"
"switchboard-core/database"
"switchboard-core/store"
"armature/config"
"armature/database"
"armature/store"
)
// Claims represents the JWT payload. Must match handlers.Claims.
@@ -142,11 +142,11 @@ func parseAndValidateJWT(tokenString string, jwtSecret string) (*Claims, bool) {
return claims, true
}
// UserIDFromCookie extracts the user ID from the sb_token cookie without
// UserIDFromCookie extracts the user ID from the arm_token cookie without
// requiring authentication. Returns "" if no valid token is found.
// Used by unauthenticated routes that want optional user context.
func UserIDFromCookie(c *gin.Context, jwtSecret string) string {
cookie, err := c.Cookie("sb_token")
cookie, err := c.Cookie("arm_token")
if err != nil || cookie == "" {
return ""
}