login user after registration, delete task

This commit is contained in:
Florian Hoss 2022-04-07 15:39:22 +02:00
parent c9063c2fa9
commit 5e63fc1e38
6 changed files with 30 additions and 22 deletions

View file

@ -50,7 +50,7 @@ func (db *Database) DeleteTask(id string) {
}
func (db *Database) CreateUser(username string, password string) error {
user := User{Username: username, Password: password}
user := User{Username: username, Password: password, LoggedIn: true}
result := db.ORM.Create(&user)
return result.Error
}