From 8e65b0c16b2fec5f34b09be7b45851af4985f414 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 13 Apr 2021 22:42:07 +0200 Subject: [PATCH] Fix lint & generate docs --- pkg/models/tasks.go | 2 +- pkg/swagger/docs.go | 12 ++++++------ pkg/swagger/swagger.json | 12 ++++++------ pkg/swagger/swagger.yaml | 20 ++++++++++++-------- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index b2e3a8631..fa6071536 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -1222,7 +1222,7 @@ func updateDone(oldTask *Task, newTask *Task) { setTaskDatesMonthRepeat(oldTask, newTask) case TaskRepeatModeFromCurrentDate: setTaskDatesFromCurrentDateRepeat(oldTask, newTask) - default: + case TaskRepeatModeDefault: setTaskDatesDefault(oldTask, newTask) } diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index 74c2dcb9f..81c5871b0 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -7362,9 +7362,9 @@ var doc = `{ "description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.", "type": "integer" }, - "repeat_from_current_date": { - "description": "If specified, a repeating task will repeat from the current date rather than the last set date.", - "type": "boolean" + "repeat_mode": { + "description": "Can have three possible values which will trigger when the task is marked as done: 0 = repeats after the amount specified in repeat_after, 1 = repeats all dates each months (ignoring repeat_after), 3 = repeats from the current date rather than the last set date.", + "type": "integer" }, "start_date": { "description": "When this task starts.", @@ -7939,9 +7939,9 @@ var doc = `{ "description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.", "type": "integer" }, - "repeat_from_current_date": { - "description": "If specified, a repeating task will repeat from the current date rather than the last set date.", - "type": "boolean" + "repeat_mode": { + "description": "Can have three possible values which will trigger when the task is marked as done: 0 = repeats after the amount specified in repeat_after, 1 = repeats all dates each months (ignoring repeat_after), 3 = repeats from the current date rather than the last set date.", + "type": "integer" }, "start_date": { "description": "When this task starts.", diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index d453eeb56..45bc56c7a 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -7345,9 +7345,9 @@ "description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.", "type": "integer" }, - "repeat_from_current_date": { - "description": "If specified, a repeating task will repeat from the current date rather than the last set date.", - "type": "boolean" + "repeat_mode": { + "description": "Can have three possible values which will trigger when the task is marked as done: 0 = repeats after the amount specified in repeat_after, 1 = repeats all dates each months (ignoring repeat_after), 3 = repeats from the current date rather than the last set date.", + "type": "integer" }, "start_date": { "description": "When this task starts.", @@ -7922,9 +7922,9 @@ "description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.", "type": "integer" }, - "repeat_from_current_date": { - "description": "If specified, a repeating task will repeat from the current date rather than the last set date.", - "type": "boolean" + "repeat_mode": { + "description": "Can have three possible values which will trigger when the task is marked as done: 0 = repeats after the amount specified in repeat_after, 1 = repeats all dates each months (ignoring repeat_after), 3 = repeats from the current date rather than the last set date.", + "type": "integer" }, "start_date": { "description": "When this task starts.", diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index a545d2170..6d1861204 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -222,10 +222,12 @@ definitions: when marking the task as done, it will mark itself as "undone" and then increase all remindes and the due date by its amount. type: integer - repeat_from_current_date: - description: If specified, a repeating task will repeat from the current date - rather than the last set date. - type: boolean + repeat_mode: + description: 'Can have three possible values which will trigger when the task + is marked as done: 0 = repeats after the amount specified in repeat_after, + 1 = repeats all dates each months (ignoring repeat_after), 3 = repeats from + the current date rather than the last set date.' + type: integer start_date: description: When this task starts. type: string @@ -703,10 +705,12 @@ definitions: when marking the task as done, it will mark itself as "undone" and then increase all remindes and the due date by its amount. type: integer - repeat_from_current_date: - description: If specified, a repeating task will repeat from the current date - rather than the last set date. - type: boolean + repeat_mode: + description: 'Can have three possible values which will trigger when the task + is marked as done: 0 = repeats after the amount specified in repeat_after, + 1 = repeats all dates each months (ignoring repeat_after), 3 = repeats from + the current date rather than the last set date.' + type: integer start_date: description: When this task starts. type: string