1
0

initial commit

This commit is contained in:
konrad
2018-06-10 11:11:41 +02:00
committed by kolaente
commit 479cf54ada
595 changed files with 427508 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package v1
import (
"fmt"
"git.kolaente.de/konrad/list/models"
"github.com/dgrijalva/jwt-go"
"github.com/labstack/echo"
)
// CheckToken checks prints a message if the token is valid or not. Currently only used for testing pourposes.
func CheckToken(c echo.Context) error {
user := c.Get("user").(*jwt.Token)
fmt.Println(user.Valid)
return c.JSON(418, models.Message{"🍵"})
}