refactor: migrate endpoints

This commit is contained in:
Mauricio Siu
2025-02-14 02:52:37 -06:00
parent b6c29ccf05
commit 55abac3f2f
19 changed files with 260 additions and 256 deletions

View File

@@ -16,13 +16,13 @@ export type Project = typeof projects.$inferSelect;
export const createProject = async (
input: typeof apiCreateProject._type,
adminId: string,
userId: string,
) => {
const newProject = await db
.insert(projects)
.values({
...input,
adminId: adminId,
userId: userId,
})
.returning()
.then((value) => value[0]);