1
0

feat(views): sort tasks by their position relative to the view they're in

This commit is contained in:
kolaente
2024-03-14 22:55:18 +01:00
parent 2502776460
commit d1d07f462c
6 changed files with 53 additions and 6 deletions

View File

@ -1114,6 +1114,25 @@ func (err ErrInvalidReactionEntityKind) HTTPError() web.HTTPError {
}
}
// ErrMustHaveProjectViewToSortByPosition represents an error where no project view id was supplied
type ErrMustHaveProjectViewToSortByPosition struct{}
func (err ErrMustHaveProjectViewToSortByPosition) Error() string {
return "You must provide a project view ID when sorting by position"
}
// ErrCodeMustHaveProjectViewToSortByPosition holds the unique world-error code of this error
const ErrCodeMustHaveProjectViewToSortByPosition = 4026
// HTTPError holds the http error description
func (err ErrMustHaveProjectViewToSortByPosition) HTTPError() web.HTTPError {
return web.HTTPError{
HTTPCode: http.StatusBadRequest,
Code: ErrCodeMustHaveProjectViewToSortByPosition,
Message: "You must provide a project view ID when sorting by position",
}
}
// ============
// Team errors
// ============