diff --git a/Lab01/app/database/database.go b/Lab01/app/database/database.go index eac4ab8..6eb5fa1 100644 --- a/Lab01/app/database/database.go +++ b/Lab01/app/database/database.go @@ -28,6 +28,12 @@ func (db *Database) Initialize() { db.ORM = orm } +func (db *Database) GetAllTasks() []Task { + var tasks []Task + db.ORM.Find(&tasks) + return tasks +} + func (db *Database) CreateUser(username string, password string) error { user := User{Username: username, Password: password} result := db.ORM.Create(&user) diff --git a/Lab01/app/templates/login.tmpl b/Lab01/app/templates/login.tmpl index 339755b..9b2691f 100644 --- a/Lab01/app/templates/login.tmpl +++ b/Lab01/app/templates/login.tmpl @@ -12,7 +12,7 @@