https://github.com/SciCatProject/backend/pull/2887/changes#diff-ea81e2d2886b2ed8094201f579f2be688074296f30b541b9f5c3240bed32d12cR248 needs this method, but requires a cross controller dependency. https://github.com/SciCatProject/backend/pull/2888/changes#diff-a32900a0e4a4a230fb83725de0a2a2d4de5b1d40307857fd6948ac138d812818R63 also needs this, but duplicates the method instead of cross-controller dependency. Refactor it to a util / common helper, and fix these inconsitencies.
https://github.com/SciCatProject/backend/pull/2887/changes#diff-ea81e2d2886b2ed8094201f579f2be688074296f30b541b9f5c3240bed32d12cR248 needs this method, but requires a cross controller dependency.
https://github.com/SciCatProject/backend/pull/2888/changes#diff-a32900a0e4a4a230fb83725de0a2a2d4de5b1d40307857fd6948ac138d812818R63 also needs this, but duplicates the method instead of cross-controller dependency.
Refactor it to a util / common helper, and fix these inconsitencies.