Record experiment updated in more places (#24)
* Record experiment updated in more places * Update experiment updatedAt in same transaction
This commit is contained in:
12
src/server/utils/recordExperimentUpdated.ts
Normal file
12
src/server/utils/recordExperimentUpdated.ts
Normal 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(),
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user