almost there but tasks dont disappear in UI and click&drag doesnt work

This commit is contained in:
Bel LaPointe
2019-11-14 14:25:16 -07:00
parent cf1fd1dfed
commit b6397a71d4
11 changed files with 325 additions and 153 deletions

View File

@@ -9,12 +9,9 @@ import (
"regexp"
"strings"
"time"
"github.com/google/uuid"
)
type Task struct {
ID string
UUID string
Title string
Priority int
@@ -37,7 +34,7 @@ func (sl StrList) MarshalJSON() ([]byte, error) {
func New(r *http.Request) (*Task, error) {
task := &Task{
UUID: uuid.New().String(),
UUID: form.NewUUID(),
Title: form.Get(r, "title"),
Priority: form.ToInt(form.Get(r, "prio")),
Tags: StrList(form.ToStrArr(form.Get(r, "tags"))),
@@ -46,7 +43,6 @@ func New(r *http.Request) (*Task, error) {
Due: form.ToTime(form.Get(r, "duedate")),
}
task.ID = task.UUID
task.SetNote(form.Get(r, "note"))
return task, task.validate()
}