well deserved clean up (#1)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-18 21:53:07 +01:00
parent 3a8404f704
commit b7513f24d5
106 changed files with 453 additions and 1275 deletions

View File

@@ -1,9 +1,9 @@
import type { Project } from '../prisma-client';
import { db } from '../prisma-client';
export type IServiceProject = ReturnType<typeof transform>;
export type IServiceProject = ReturnType<typeof transformProject>;
function transform({ organization_slug, ...project }: Project) {
export function transformProject({ organization_slug, ...project }: Project) {
return {
organizationSlug: organization_slug,
...project,
@@ -21,7 +21,7 @@ export async function getProjectById(id: string) {
return null;
}
return transform(res);
return transformProject(res);
}
export async function getProjectsByOrganizationSlug(slug: string) {
@@ -31,5 +31,5 @@ export async function getProjectsByOrganizationSlug(slug: string) {
},
});
return res.map(transform);
return res.map(transformProject);
}