Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { getDbClient } from "./client.server.js";
|
||||
import type { Event } from "./prisma-browser.js";
|
||||
|
||||
export type LegacyEventCreateData = {
|
||||
tenantId: string | null;
|
||||
userId: string | null;
|
||||
name: string;
|
||||
data: string;
|
||||
description: string | null;
|
||||
};
|
||||
|
||||
export type LegacyEventWriterClient = {
|
||||
event: {
|
||||
create(args: { data: LegacyEventCreateData }): Promise<Event>;
|
||||
};
|
||||
};
|
||||
|
||||
export async function createLegacyEvent(
|
||||
data: LegacyEventCreateData,
|
||||
client: LegacyEventWriterClient = getDbClient() as unknown as LegacyEventWriterClient,
|
||||
): Promise<Event> {
|
||||
return client.event.create({ data });
|
||||
}
|
||||
Reference in new issue
Block a user