fix: lint
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2023-02-14 20:37:11 +01:00
parent 5a0cee2fc5
commit 20a5994b17
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 10 additions and 8 deletions

View File

@ -448,17 +448,17 @@ func (s *HandleTaskUpdateLastUpdated) Handle(msg *message.Message) (err error) {
}
var taskIDInt int64
switch taskID.(type) {
switch v := taskID.(type) {
case int64:
taskIDInt = taskID.(int64)
taskIDInt = v
case int:
taskIDInt = int64(taskID.(int))
taskIDInt = int64(v)
case int32:
taskIDInt = int64(taskID.(int32))
taskIDInt = int64(v)
case float64:
taskIDInt = int64(taskID.(float64))
taskIDInt = int64(v)
case float32:
taskIDInt = int64(taskID.(float32))
taskIDInt = int64(v)
default:
log.Errorf("Event payload does not contain a valid task ID")
return

View File

@ -17,10 +17,11 @@
package models
import (
"code.vikunja.io/api/pkg/events"
"io"
"time"
"code.vikunja.io/api/pkg/events"
"code.vikunja.io/api/pkg/files"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/web"

View File

@ -17,9 +17,10 @@
package models
import (
"code.vikunja.io/api/pkg/events"
"time"
"code.vikunja.io/api/pkg/events"
"xorm.io/builder"
"xorm.io/xorm"