v1.TokenNewPOST => /tokens, /tokens/new

This commit is contained in:
Howl 2016-06-15 00:23:55 +02:00
parent fc38503bdd
commit 24d34eb741
2 changed files with 2 additions and 1 deletions

View File

@ -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))

View File

@ -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()
}