diff --git a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.controller.spec.ts b/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.controller.spec.ts deleted file mode 100644 index 6c482224d..000000000 --- a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.controller.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { OsoCodeMetricsByProjectV1Controller } from './oso_code-metrics-by-project-v1.controller'; -import { OsoCodeMetricsByProjectV1Service } from './oso_code-metrics-by-project-v1.service'; - -describe('OsoCodeMetricsByProjectV1Controller', () => { - let controller: OsoCodeMetricsByProjectV1Controller; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - controllers: [OsoCodeMetricsByProjectV1Controller], - providers: [OsoCodeMetricsByProjectV1Service], - }).compile(); - - controller = module.get(OsoCodeMetricsByProjectV1Controller); - }); - - it('should be defined', () => { - expect(controller).toBeDefined(); - }); -}); diff --git a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.controller.ts b/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.controller.ts deleted file mode 100644 index d1608d67a..000000000 --- a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.controller.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'; -import { OsoCodeMetricsByProjectV1Service } from './oso_code-metrics-by-project-v1.service'; - -@Controller('v1/oso-code-metrics-by-project-v1') -export class OsoCodeMetricsByProjectV1Controller { - constructor(private readonly osoCodeMetricsByProjectV1Service: OsoCodeMetricsByProjectV1Service) {} - - @Get() - findAll() { - return this.osoCodeMetricsByProjectV1Service.findAll(); - } - - @Get(':name') - findOne(@Param('name') name: string) { - return this.osoCodeMetricsByProjectV1Service.findOne(name); - } -} diff --git a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.module.ts b/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.module.ts deleted file mode 100644 index adae63f8d..000000000 --- a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Module } from '@nestjs/common'; -import { OsoCodeMetricsByProjectV1Service } from './oso_code-metrics-by-project-v1.service'; -import { OsoCodeMetricsByProjectV1Controller } from './oso_code-metrics-by-project-v1.controller'; - -@Module({ - controllers: [OsoCodeMetricsByProjectV1Controller], - providers: [OsoCodeMetricsByProjectV1Service], - exports: [OsoCodeMetricsByProjectV1Service], -}) -export class OsoCodeMetricsByProjectV1Module {} diff --git a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.service.spec.ts b/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.service.spec.ts deleted file mode 100644 index 817df62f8..000000000 --- a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.service.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { OsoCodeMetricsByProjectV1Service } from './oso_code-metrics-by-project-v1.service'; - -describe('OsoCodeMetricsByProjectV1Service', () => { - let service: OsoCodeMetricsByProjectV1Service; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - providers: [OsoCodeMetricsByProjectV1Service], - }).compile(); - - service = module.get(OsoCodeMetricsByProjectV1Service); - }); - - it('should be defined', () => { - expect(service).toBeDefined(); - }); -}); diff --git a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.service.ts b/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.service.ts deleted file mode 100644 index 6384bf4ca..000000000 --- a/apps/web-api/src/oso_code-metrics-by-project-v1/oso_code-metrics-by-project-v1.service.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Injectable, InternalServerErrorException } from '@nestjs/common'; -import { OsoPrismaService } from '../shared/oso-prisma.service'; - -@Injectable() -export class OsoCodeMetricsByProjectV1Service { - constructor(private prisma: OsoPrismaService) {} - - findAll() { - try { - return this.prisma.oso_codeMetricsByProjectV1.findMany(); - } catch (error) { - throw new InternalServerErrorException(`Error occured while retrieving project metrics data: ${error.message}`); - } - } - - findOne(displayName: string) { - try { - return ( - this.prisma.oso_codeMetricsByProjectV1.findFirst({ - where: { displayName }, - }) ?? {} - ); - } catch (error) { - throw new InternalServerErrorException(`Error occured while retrieving project metrics data: ${error.message}`); - } - } -}