From 24d34eb7416604dd6c989b073ed7444020a232f8 Mon Sep 17 00:00:00 2001 From: Howl Date: Wed, 15 Jun 2016 00:23:55 +0200 Subject: [PATCH] v1.TokenNewPOST => /tokens, /tokens/new --- app/start.go | 1 + app/v1/ping.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/start.go b/app/start.go index c8e43fe..41c1864 100644 --- a/app/start.go +++ b/app/start.go @@ -23,6 +23,7 @@ func Start(conf common.Conf, dbO *sql.DB) *gin.Engine { { gv1 := api.Group("/v1") { + gv1.POST("/tokens", Method(v1.TokenNewPOST)) gv1.POST("/tokens/new", Method(v1.TokenNewPOST)) gv1.GET("/tokens/self/delete", Method(v1.TokenSelfDeleteGET)) diff --git a/app/v1/ping.go b/app/v1/ping.go index 548be75..17e1ca9 100644 --- a/app/v1/ping.go +++ b/app/v1/ping.go @@ -97,7 +97,7 @@ func PingGET(md common.MethodData) common.CodeMessager { r.Code = 200 if md.ID() == 0 { - r.Message = "You have not given us a token, so we don't know who you are! But you can still login with /api/v1/tokens/new " + kaomojis[rn.Intn(len(kaomojis))] + r.Message = "You have not given us a token, so we don't know who you are! But you can still login with POST /tokens " + kaomojis[rn.Intn(len(kaomojis))] } else { r.Message = surpriseMe() }