Add apimodel.FilterActionNone

This commit is contained in:
Vyr Cossont 2024-05-02 09:09:44 -07:00
parent ef20a4e9a1
commit 9ca82930ef
2 changed files with 3 additions and 1 deletions

View File

@ -63,6 +63,8 @@ type FilterV2 struct {
type FilterAction string
const (
// FilterActionNone filters should not exist, except internally, for partially constructed or invalid filters.
FilterActionNone FilterAction = ""
// FilterActionWarn filters will include this status in API results with a warning.
FilterActionWarn FilterAction = "warn"
// FilterActionHide filters will remove this status from API results.

View File

@ -1922,7 +1922,7 @@ func filterActionToAPIFilterAction(m gtsmodel.FilterAction) apimodel.FilterActio
case gtsmodel.FilterActionHide:
return apimodel.FilterActionHide
}
return ""
return apimodel.FilterActionNone
}
// convertEmojisToAPIEmojis will convert a slice of GTS model emojis to frontend API model emojis, falling back to IDs if no GTS models supplied.