aboutsummaryrefslogtreecommitdiff
path: root/pages/home/home.go
blob: 6107da1560e85dcc3ea401b5ad39bb144555672e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package home

import (
	"dove/config"
	"dove/utils/meta"
	"dove/utils/shortcuts"

	"github.com/gofiber/fiber/v2"
)

func Home(context *fiber.Ctx) error {
	switch config.AuthEnabled {
	case true:
		meta.SetPageTitle(context, "Login")
		return shortcuts.Render(context, "auth/login", nil)
	default:
		return shortcuts.Redirect(context, "dashboard.index")
	}
}