1
0

fix(typesense): reindex tasks when their position changed

This commit is contained in:
kolaente
2024-07-11 12:07:48 +02:00
parent 0b424fe95e
commit 471d0fcd4a
3 changed files with 52 additions and 1 deletions

View File

@ -166,7 +166,12 @@ func RecalculateTaskPositions(s *xorm.Session, view *ProjectView, a web.Auth) (e
}
_, err = s.Insert(newPositions)
return
if err != nil {
return
}
return events.Dispatch(&TaskPositionsRecalculatedEvent{
NewTaskPositions: newPositions,
})
}
func getPositionsForView(s *xorm.Session, view *ProjectView) (positions []*TaskPosition, err error) {