feat(core): Support create, read, update, delete projects in Public API (#10269)

This commit is contained in:
Iván Ovejero
2024-08-02 12:02:05 +02:00
committed by GitHub
parent dc8c94d036
commit 489ce10063
10 changed files with 594 additions and 1 deletions

View File

@@ -34,6 +34,10 @@ export const linkUserToProject = async (user: User, project: Project, role: Proj
);
};
export async function getProjectByNameOrFail(name: string) {
return await Container.get(ProjectRepository).findOneOrFail({ where: { name } });
}
export const getPersonalProject = async (user: User): Promise<Project> => {
return await Container.get(ProjectRepository).findOneOrFail({
where: {