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