almost there but tasks dont disappear in UI and click&drag doesnt work
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user