BobbyWibowo / lolisafe

Blazing fast file uploader and awesome bunker written in node! 🚀
MIT License
317 stars 56 forks source link

Album list API should return all albums in certain situations #343

Closed BobbyWibowo closed 3 years ago

BobbyWibowo commented 3 years ago

https://github.com/BobbyWibowo/lolisafe/blob/771a3f65d2c34ca6b0c7d700c741ac6737fccd88/controllers/albumsController.js#L71

e.g. when presented with the option to choose album when trying to move an upload into an album, or the select album option in homepage uploader. The payload can potentially be simplified to only their IDs and names, to minimize overhead when people have nasty amount of albums.

Afterwards may consider listing all albums in sidebar anyway, but with expand/collapse toggle.

Additionally, consider allowing to fetch albums' files list while non-authorized, as long as its public page is enabled. Preparation stage for allowing Magane to use lolisafe-based albums as custom packs (lolisafe upstream dev branch already has non-auth API for this).

BobbyWibowo commented 3 years ago

Main issue fixed in https://github.com/BobbyWibowo/lolisafe/commit/c5647cb8bf1ac0e0d1567623b5a511e1bc7e90b2.

Additionally, consider allowing to fetch albums' files list while non-authorized, as long as its public page is enabled. Preparation stage for allowing Magane to use lolisafe-based albums as custom packs (lolisafe upstream dev branch already has non-auth API for this).

Still to-do.

BobbyWibowo commented 3 years ago

Last one implemented in https://github.com/BobbyWibowo/lolisafe/commit/e85e8e886dae821d2acd028b0b0ce158fe7d19a2.