Fix extra space and call migrate on boot
This commit is contained in:
@@ -30,7 +30,7 @@ type Task struct {
|
||||
type StrList []string
|
||||
|
||||
func (sl StrList) MarshalJSON() ([]byte, error) {
|
||||
s := strings.Join(sl, ", ")
|
||||
s := strings.Join(sl, ",")
|
||||
return json.Marshal(s)
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ func (t *Task) MarshalJSON() ([]byte, error) {
|
||||
"note": strings.Join(t.Note, "\n"),
|
||||
"noteText": strings.Join(t.Note, "\n"),
|
||||
"ow": 0,
|
||||
"tags": strings.Join([]string(t.Tags), ", "),
|
||||
"tags": strings.Join([]string(t.Tags), ","),
|
||||
"tags_ids": strings.Join([]string(tagsIds), ","),
|
||||
"duedate": t.Due.Format(fullFormat),
|
||||
"dueClass": "",
|
||||
|
||||
@@ -65,7 +65,7 @@ func TestJSONMarshal(t *testing.T) {
|
||||
json.Unmarshal(b, &m)
|
||||
if v, ok := m["tags"]; !ok {
|
||||
t.Error(ok, m)
|
||||
} else if v != "a, b" {
|
||||
} else if v != "a,b" {
|
||||
t.Error(v, m)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user