feat: add getProjectDetails method and corresponding endpoint
This commit is contained in:
@ -27,6 +27,19 @@ export class ProjectService {
|
||||
return projectSaved;
|
||||
}
|
||||
|
||||
async getProjectDetails(projectId: string) {
|
||||
const project = await this.projectRepository.findOne({
|
||||
where: { id: projectId },
|
||||
relations: ["database", "database.migrations", "queries", "functions"],
|
||||
});
|
||||
|
||||
return {
|
||||
migrations: project?.database?.migrations || [],
|
||||
queries: project?.queries || [],
|
||||
functions: project?.functions || [],
|
||||
};
|
||||
}
|
||||
|
||||
async findById(id: string) {
|
||||
const cached = await this.redisClient.get(`project_${id}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user