feat: added audit log prune, resolved env update and pino file transport on prod

This commit is contained in:
Akhil Mohan
2024-01-31 22:07:49 +05:30
parent 7bf1f4708a
commit 560f8d4a9b
9 changed files with 161 additions and 56 deletions
@@ -67,7 +67,7 @@ export const projectEnvServiceFactory = ({
if (!oldEnv) throw new BadRequestError({ message: "Environment not found" });
if (slug) {
const existingEnv = await projectEnvDAL.findOne({ slug });
const existingEnv = await projectEnvDAL.findOne({ slug, projectId });
if (existingEnv && existingEnv.id !== id) {
throw new BadRequestError({
message: "Environment with slug already exist",