I'm trying to init my parameters so I can run getProducts(), as well as
getProducts({
query: {},
p: {
offset: 0,
sort: {
_id: 1
},
limit: 25,
count: 0
}
})
. So far, only the latter works, using this function :
getProducts({
query = {},
pagination: {
offset = 0,
sort = {
_id: 1
},
limit = 25
}
}) {
console.log(offset, limit, sort)
}
I'm pretty sure I'm missing something simple on initialisation, but can't figure out what, even with the MDN docs.