rename utils to helpers

This commit is contained in:
Sky Johnson 2025-08-11 13:22:20 -05:00
parent 4a73b7cc0d
commit c473e41b45
4 changed files with 5 additions and 5 deletions

View File

@ -2,8 +2,8 @@ package auth
import (
"dk/internal/cookies"
"dk/internal/helpers"
"dk/internal/session"
"dk/internal/utils"
"time"
"github.com/valyala/fasthttp"
@ -18,7 +18,7 @@ func SetSessionCookie(ctx *fasthttp.RequestCtx, sessionID string) {
Path: "/",
Expires: time.Now().Add(session.DefaultExpiration),
HTTPOnly: true,
Secure: utils.IsHTTPS(ctx),
Secure: helpers.IsHTTPS(ctx),
SameSite: "lax",
})
}
@ -29,4 +29,4 @@ func GetSessionCookie(ctx *fasthttp.RequestCtx) string {
func DeleteSessionCookie(ctx *fasthttp.RequestCtx) {
cookies.DeleteCookie(ctx, SessionCookieName)
}
}

View File

@ -1,4 +1,4 @@
package utils
package helpers
import "github.com/valyala/fasthttp"

View File

@ -6,7 +6,7 @@ import (
"time"
"dk/internal/database"
"dk/internal/utils/scanner"
"dk/internal/helpers/scanner"
"zombiezen.com/go/sqlite"
)