ADD:added decode jwt token and automated login to dashboard after login
This commit is contained in:
@@ -24,7 +24,7 @@ func LoginHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Systemnutzer
|
||||
if req.Email == "systemuser@example.com" {
|
||||
if req.Email == "test@localhost.de" {
|
||||
token, err := CreateJWT("system-user-id", req.Email, "admin", time.Hour*24*7)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Token error"})
|
||||
|
||||
Reference in New Issue
Block a user