diff --git a/db/tasks.go b/db/tasks.go index c038c8e..3126f72 100644 --- a/db/tasks.go +++ b/db/tasks.go @@ -152,7 +152,7 @@ func GetTaskByID(username string, id int) (types.Context, error) { var tasks []types.Task var task types.Task - getTaskSQL := "select t.id, t.title, t.content, t.priority, t.hide, 'UNCATEGORIZED' from task t join user u where t.user_id=u.id and t.cat_id=0 union select t.id, t.title, t.content, t.priority, c.name from task t join user u left outer join category c where c.id = t.cat_id and t.user_id=u.id and t.id=? and u.username=?;" + getTaskSQL := "select t.id, t.title, t.content, t.priority, t.hide, 'UNCATEGORIZED' from task t join user u where t.user_id=u.id and t.cat_id=0 union select t.id, t.title, t.content, t.priority, t.hide, c.name from task t join user u left outer join category c where c.id = t.cat_id and t.user_id=u.id and t.id=? and u.username=?;" rows := database.query(getTaskSQL, id, username) defer rows.Close() @@ -250,7 +250,7 @@ func GetCategoryIDByName(username string, category string) int { } //UpdateTask is used to update the tasks in the database -func UpdateTask(id int, title, content, category string, priority int, username string) error { +func UpdateTask(id int, title, content, category string, priority int, username string, hidden int) error { categoryID := GetCategoryIDByName(username, category) userID, err := GetUserID(username) if err != nil { diff --git a/templates/edit.html b/templates/edit.html index e4ea9ea..16924c2 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -18,7 +18,7 @@ Medium Low - Hide from timeline + Hide from timeline
Category: