mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-08 02:03:33 +08:00
13 lines
321 B
Go
13 lines
321 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.conf.SessionMaxAge(), s.conf.SessionTimeout()).SetContext(c)
|
|
}
|