aboutsummaryrefslogtreecommitdiff
path: root/router/domain.go
blob: 50b1163ba4263896f457910ace3879e6d7e1adac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package router

import (
	domainController "dove/controllers/domain"
	domainPage "dove/pages/domain"
	"dove/utils/auth"
	"dove/utils/urls"
)

func init() {
	urls.SetNamespace("domains")

	urls.Path(urls.Get, "/", auth.RequireAuthentication(domainPage.Index), "index")
	urls.Path(urls.Get, "/tlds", auth.RequireAuthentication(domainPage.TLDs), "tlds")
	urls.Path(urls.Get, "/tlds/new", auth.RequireAuthentication(domainPage.NewTLD), "tlds.new")
	urls.Path(urls.Post, "/tlds", auth.RequireAuthentication(domainController.CreateTLD), "tlds.create")
	urls.Path(urls.Delete, "/tlds/:name", auth.RequireAuthentication(domainController.DeleteTLD), "tlds.delete")
	urls.Path(urls.Get, "/manage", auth.RequireAuthentication(domainPage.Domains), "manage")
	urls.Path(urls.Get, "/manage/new", auth.RequireAuthentication(domainPage.NewDomain), "manage.new")
	urls.Path(urls.Post, "/manage", auth.RequireAuthentication(domainController.CreateDomain), "manage.create")
}