package setup

import (
	"gitlab.thpeetz.de/kontor/kontor-go/pkg/auth"
	"gitlab.thpeetz.de/kontor/kontor-go/pkg/dao"
)

// CleanupSessions removes all sessions from database.
func CleanupSessions() {
	sessionDao := auth.SessionDAO{Db: dao.KontorDb}
	sessions, _ := sessionDao.FindAll()
	for _, session := range sessions {
		sessionDao.Delete(session)
	}
}
