lecoffre-back/src/common/services/project/ProjectsService.ts
hugolxt ead8f43b7f
Staging implementation (#9)
The creation of a single repository is no longer relevant. Therefore, we
have to separate the front and back repo into two distinct repositories.
This PR allows to repatriate the work on dev branch
2023-03-15 14:40:23 +01:00

38 lines
1.1 KiB
TypeScript

// import ProjectsRepository from "@Common/repositories/projects/ProjectsRepository";
import { ProjectEntity } from "@Common/ressources";
import BaseService from "@Services/BaseService";
import { Service } from "typedi";
@Service()
export default class ProjectsService extends BaseService {
constructor() {
super();
}
/**
* @throws {Error} If projects are undefined
*/
// public async getByCriterias(query: ReturnType<typeof processFindManyQuery>): Promise<ProjectEntity[]> {
// return this.projectRepository.findMany(query);
// }
/**
* @throws {Error} If project is undefined
*/
public async getByUUID(projectEntity: Partial<ProjectEntity>){
// const project = await this.projectRepository.findOne(projectEntity);
// if (!project) Promise.reject(new Error("Cannot get project by uuid"));
// return project;
}
/**
*
* @throws {Error} If project cannot be created
* @returns
*/
public async create(projectEntity: Partial<ProjectEntity>){
// const project = await this.projectRepository.create(projectEntity);
// if (!project) Promise.reject(new Error("Cannot create project"));
// return project;
}
}