Add tags query to secrets api

This commit is contained in:
Maidul Islam
2023-02-13 22:28:59 -08:00
parent e243c72ca6
commit fba54ae0c6

View File

@@ -289,8 +289,7 @@ export const getSecrets = async (req: Request, res: Response) => {
const { workspaceId, environment, tagSlugs } = req.query;
const tagNamesList = typeof tagSlugs === 'string' ? tagSlugs.split(',') : [];
const tagNamesList = typeof tagSlugs === 'string' && tagSlugs !== '' ? tagSlugs.split(',') : [];
let userId = "" // used for getting personal secrets for user
let userEmail = "" // used for posthog
if (req.user) {