unstable: initial tags

This commit is contained in:
ston1th 2019-08-20 23:57:43 +02:00
commit b3b62af3a4
28 changed files with 503 additions and 91 deletions

View file

@ -89,7 +89,7 @@ var prefixRoutes = []route{
var routes = append(static, []route{
{
"/search",
core.SearchURI,
jwtHandler(
authHandler(
searchHandler)),
@ -122,6 +122,27 @@ var routes = append(static, []route{
userTotpHandler)),
[]string{"GET", "POST"},
},
{
"/tags",
jwtHandler(
authHandler(
tagsHandler)),
[]string{"GET"},
},
{
"/tags/{tag:[a-zA-Z0-9]+}/edit",
jwtHandler(
authHandler(
tagsEditHandler)),
[]string{"GET", "POST"},
},
{
"/tags/{tag:[a-zA-Z0-9]+}/del",
jwtHandler(
authHandler(
tagsDelHandler)),
[]string{"GET", "POST"},
},
{
core.LogoutURI,
jwtHandler(