isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

Fix/rename subcollection and rename/delete resource room #692

Closed alexanderleegs closed 1 year ago

alexanderleegs commented 1 year ago

Problem

This PR fixes an issue with our subcollection rename and resource room rename/delete methods. For subcollection rename, when renaming subcollections, we no longer use the baseDirectoryService.rename but instead delete and recreate each individual file, meaning it was no longer necessary to pass githubSessionData, but our call site still passed this as an argument, which resulted in subcollection renaming not working as expected. The resource room delete/rename methods were missing the githubSessionData argument. This PR fjxes this behaviour.

In addition, the existing use of reqDetails was changed to sessionData to bring it in line with the rest of our methods to reduce confusion.

alexanderleegs commented 1 year ago

lgtm, there wasn't any logic changes beyond src/routes/v2/authenticatedSites/collections.js right? (where we deleted the extra param)

same logic changes for resource room renaming and deletion (remove extra param) - other than that it was just var renaming