isomerpages/isomercms-backend

Fix `listPages` route for simple pages

Closed this issue · 0 comments

Background

Currently on Workspace, we use the directory route GET /:siteName/files/:path to list Workspace simple pages. However, this is confusing as for all our other types of files, we have specific file-specific routes such as GET /:siteName/collections/:collectionName to return the list of collection files.

We have an existing route /:siteName/pages route, but it returns both collection and unlinked pages. Also the function does not work as getUnlinkedPages was accidentally removed in a previous PR, and the route is currently unused on the frontend

Solution

To match the structure of our other file types, we should refactor the pages endpoint GET /:siteName/pages to return all simple pages.