Add login endpoint and generate a valid token

This commit is contained in:
Miguel de la Cruz 2021-09-13 12:46:43 +02:00
parent 83a2d2a31f
commit 9b6f7cbdcc
6 changed files with 89 additions and 11 deletions

View file

@ -5,11 +5,11 @@ import (
)
type User struct {
ID int
Name string
Mail string
Username string
Password string
ID int `json:"id"`
Name string `json:"name"`
Mail string `json:"mail"`
Username string `json:"username"`
Password string `json:"-"`
}
func (u *User) IsValid() error {