Fix lint
Some checks reported errors
continuous-integration/drone/pr Build was killed

This commit is contained in:
kolaente 2021-04-11 16:23:54 +02:00
parent 180384ec7d
commit da4e7053f3
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
6 changed files with 469 additions and 208 deletions

View File

@ -197,7 +197,7 @@ func (n *UndoneTaskOverdueNotification) ToMail() *notifications.Mail {
return notifications.NewMail(). return notifications.NewMail().
Subject(`Task "`+n.Task.Title+`" is overdue`). Subject(`Task "`+n.Task.Title+`" is overdue`).
Greeting("Hi "+n.User.GetName()+","). Greeting("Hi "+n.User.GetName()+",").
Line(`This is a friendly reminder of the task "`+n.Task.Title+`" which is overdue since `+n.Task.DueDate.Sub(time.Now()).String()+` and not yet done.`). Line(`This is a friendly reminder of the task "`+n.Task.Title+`" which is overdue since `+time.Until(n.Task.DueDate).String()+` and not yet done.`).
Action("Open Task", config.ServiceFrontendurl.GetString()+"tasks/"+strconv.FormatInt(n.Task.ID, 10)). Action("Open Task", config.ServiceFrontendurl.GetString()+"tasks/"+strconv.FormatInt(n.Task.ID, 10)).
Line("Have a nice day!") Line("Have a nice day!")
} }

View File

@ -17,10 +17,11 @@
package models package models
import ( import (
"code.vikunja.io/api/pkg/db"
"github.com/stretchr/testify/assert"
"testing" "testing"
"time" "time"
"code.vikunja.io/api/pkg/db"
"github.com/stretchr/testify/assert"
) )
func TestGetUndoneOverDueTasks(t *testing.T) { func TestGetUndoneOverDueTasks(t *testing.T) {

View File

@ -8570,6 +8570,10 @@ var doc = `{
"name": { "name": {
"description": "The new name of the current user.", "description": "The new name of the current user.",
"type": "string" "type": "string"
},
"overdue_tasks_reminders_enabled": {
"description": "If enabled, the user will get an email for their overdue tasks each morning.",
"type": "boolean"
} }
} }
}, },

View File

@ -8553,6 +8553,10 @@
"name": { "name": {
"description": "The new name of the current user.", "description": "The new name of the current user.",
"type": "string" "type": "string"
},
"overdue_tasks_reminders_enabled": {
"description": "If enabled, the user will get an email for their overdue tasks each morning.",
"type": "boolean"
} }
} }
}, },

File diff suppressed because it is too large Load Diff

View File

@ -17,8 +17,9 @@
package utils package utils
import ( import (
"code.vikunja.io/api/pkg/config"
"time" "time"
"code.vikunja.io/api/pkg/config"
) )
// GetTimeWithoutNanoSeconds returns a time.Time without the nanoseconds. // GetTimeWithoutNanoSeconds returns a time.Time without the nanoseconds.