fix(xo-server/rest-api): handle empty fields param

Introduced by c18373bb0
This commit is contained in:
Julien Fontanet
2024-01-29 11:57:47 +01:00
parent 5cabf9916a
commit f5a3cc0cdb

View File

@@ -83,7 +83,7 @@ async function sendObjects(iterable, req, res, path = req.path) {
...object,
href: makeUrl(object),
})
} else if (fields) {
} else {
fields = fields.split(',')
makeResult = object => {
const url = makeUrl(object)