Record experiment updated in more places (#24)

* Record experiment updated in more places

* Update experiment updatedAt in same transaction
This commit is contained in:
arcticfly
2023-07-10 11:00:24 -07:00
committed by GitHub
parent d6a46b9e9d
commit e64a94e06e
3 changed files with 44 additions and 23 deletions

View File

@@ -0,0 +1,12 @@
import { prisma } from "~/server/db";
export const recordExperimentUpdated = (experimentId: string) => {
return prisma.experiment.update({
where: {
id: experimentId,
},
data: {
updatedAt: new Date(),
},
});
};