Fix extra space and call migrate on boot

This commit is contained in:
bel
2019-12-07 14:34:42 -07:00
parent 72169206f8
commit 2bb3bee83c
5 changed files with 22 additions and 7 deletions

View File

@@ -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": "",

View File

@@ -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)
}
}