chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import type { Prisma } from "~/db.server";
|
||||
|
||||
export function scheduleUniqWhereClause(
|
||||
projectId: string,
|
||||
scheduleId: string
|
||||
): Prisma.TaskScheduleWhereUniqueInput {
|
||||
if (scheduleId.startsWith("sched_")) {
|
||||
return {
|
||||
friendlyId: scheduleId,
|
||||
projectId,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
projectId_deduplicationKey: {
|
||||
projectId,
|
||||
deduplicationKey: scheduleId,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function scheduleWhereClause(
|
||||
projectId: string,
|
||||
scheduleId: string
|
||||
): Prisma.TaskScheduleWhereInput {
|
||||
if (scheduleId.startsWith("sched_")) {
|
||||
return {
|
||||
friendlyId: scheduleId,
|
||||
projectId,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
projectId,
|
||||
deduplicationKey: scheduleId,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user