fix: create response via api can change created and updated at (#3091)

This commit is contained in:
Piyush Gupta
2024-09-05 16:04:42 +05:30
committed by GitHub
parent 86bf2accc9
commit b9a7edf1f5
+4
View File
@@ -204,6 +204,8 @@ export const createResponse = async (responseInput: TResponseInput): Promise<TRe
meta,
singleUseId,
ttc: initialTtc,
createdAt,
updatedAt,
} = responseInput;
try {
@@ -249,6 +251,8 @@ export const createResponse = async (responseInput: TResponseInput): Promise<TRe
...(meta && ({ meta } as Prisma.JsonObject)),
singleUseId,
ttc: ttc,
createdAt,
updatedAt,
};
const responsePrisma = await prisma.response.create({