photoprism/internal/session/session_new.go
Michael Mayer 6e74f16a77 Auth: Open album share links in the regular user interface #98 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-02 11:38:30 +02:00

12 lines
293 B
Go

package session
import (
"github.com/gin-gonic/gin"
"github.com/photoprism/photoprism/internal/entity"
)
// New creates a session with a context if it is specified.
func (s *Session) New(c *gin.Context) (m *entity.Session) {
return entity.NewSession(s.MaxAge, s.Timeout).SetContext(c)
}