package utils

import (
	"net/http"

	"github.com/gin-gonic/gin"
)

func SetCookie(c *gin.Context, token string) {
	c.SetSameSite(http.SameSiteLaxMode)
	c.SetCookie(
		"jwt",
		token,
		5*24*60*60, // 5 days
		"/",
		"",
		true,
		true,
	)
}
