fix: created_at must be UnixMilli not RFC3339 string — was silently dropping new list/section/request from tree
This commit is contained in:
parent
f06cce9089
commit
c2ddca03b7
|
|
@ -1955,7 +1955,7 @@ func (h *Handlers) CreateSection(w http.ResponseWriter, r *http.Request) {
|
||||||
`SELECT COALESCE(MAX(sort_order),0) FROM entries WHERE parent_id=? AND deleted_at IS NULL`, body.ParentID,
|
`SELECT COALESCE(MAX(sort_order),0) FROM entries WHERE parent_id=? AND deleted_at IS NULL`, body.ParentID,
|
||||||
).Scan(&maxSort)
|
).Scan(&maxSort)
|
||||||
|
|
||||||
now := time.Now().UTC().Format(time.RFC3339)
|
now := time.Now().UnixMilli()
|
||||||
secID := uuid.New().String()
|
secID := uuid.New().String()
|
||||||
name := strings.TrimSpace(body.Name)
|
name := strings.TrimSpace(body.Name)
|
||||||
secData := lib.SectionData{Name: name}
|
secData := lib.SectionData{Name: name}
|
||||||
|
|
@ -2001,7 +2001,7 @@ func (h *Handlers) CreateRequest(w http.ResponseWriter, r *http.Request) {
|
||||||
`SELECT COALESCE(MAX(sort_order),0) FROM entries WHERE parent_id=? AND deleted_at IS NULL`, body.ParentID,
|
`SELECT COALESCE(MAX(sort_order),0) FROM entries WHERE parent_id=? AND deleted_at IS NULL`, body.ParentID,
|
||||||
).Scan(&maxSort)
|
).Scan(&maxSort)
|
||||||
|
|
||||||
now := time.Now().UTC().Format(time.RFC3339)
|
now := time.Now().UnixMilli()
|
||||||
reqID := uuid.New().String()
|
reqID := uuid.New().String()
|
||||||
title := strings.TrimSpace(body.Title)
|
title := strings.TrimSpace(body.Title)
|
||||||
reqData := lib.RequestData{Title: title, Status: "open", Priority: "medium"}
|
reqData := lib.RequestData{Title: title, Status: "open", Priority: "medium"}
|
||||||
|
|
@ -2046,7 +2046,7 @@ func (h *Handlers) CreateRequestList(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now().UTC().Format(time.RFC3339)
|
now := time.Now().UnixMilli()
|
||||||
listName := strings.TrimSpace(body.Name)
|
listName := strings.TrimSpace(body.Name)
|
||||||
requestListID := uuid.New().String()
|
requestListID := uuid.New().String()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue