fix: normalize negative offset to zero in media filter
This commit is contained in:
@@ -659,6 +659,10 @@ func (mh *MediaHandler) ListMediaItemsFiltered(c echo.Context) error {
|
|||||||
limit = 50
|
limit = 50
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if offset < 0 {
|
||||||
|
offset = 0
|
||||||
|
}
|
||||||
|
|
||||||
if sort == "" {
|
if sort == "" {
|
||||||
sort = "created_at DESC"
|
sort = "created_at DESC"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user