Files
Bram 6e5680264c All workspaces homepage [6/7]: Added recently viewed page (#6107)
* Added recently viewed page and show that on workspace homepage

* Fixed undo redo

* Fixed feedback
2026-09-25 13:32:42 +02:00

18 lines
461 B
JavaScript

export default (client) => {
return {
fetchItems({ workspaceIds = [], types = [], limit, cursor = null }) {
const params = { limit }
if (cursor !== null) {
params.cursor = cursor
}
if (workspaceIds.length > 0) {
params.workspace_ids = workspaceIds.join(',')
}
if (types.length > 0) {
params.types = types.join(',')
}
return client.get('/last-viewed/items/', { params })
},
}
}