Skip to content

Commit

Permalink
Merge pull request #24 from amagovpt/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
carlosapaduarte authored Sep 6, 2024
2 parents 57e0737 + 09c970d commit dfc0bef
Show file tree
Hide file tree
Showing 217 changed files with 16,326 additions and 15,588 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@nestjs/serve-static": "^3.0.1",
"@nestjs/swagger": "^6.2.1",
"@nestjs/typeorm": "9.0.1",
"@qualweb/core": "0.7.73",
"@qualweb/core": "0.7.76",
"axios": "^1.3.4",
"bcrypt": "5.1.0",
"body-parser": "^1.20.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Test, TestingModule } from '@nestjs/testing';
import { AccessibilityStatementController } from './accessibility-statement.controller';
import { AccessibilityStatementService } from './accessibility-statement.service';
import { Test, TestingModule } from "@nestjs/testing";
import { AccessibilityStatementController } from "./accessibility-statement.controller";
import { AccessibilityStatementService } from "./accessibility-statement.service";

describe('AccessibilityStatementController', () => {
describe("AccessibilityStatementController", () => {
let controller: AccessibilityStatementController;

beforeEach(async () => {
Expand All @@ -11,10 +11,12 @@ describe('AccessibilityStatementController', () => {
providers: [AccessibilityStatementService],
}).compile();

controller = module.get<AccessibilityStatementController>(AccessibilityStatementController);
controller = module.get<AccessibilityStatementController>(
AccessibilityStatementController
);
});

it('should be defined', () => {
it("should be defined", () => {
expect(controller).toBeDefined();
});
});
Original file line number Diff line number Diff line change
@@ -1,73 +1,92 @@
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { success } from 'src/lib/response';
import { AccessibilityStatementService } from './accessibility-statement.service';

@Controller('accessibility-statement')
import {
Controller,
Get,
Post,
Body,
Patch,
Param,
Delete,
} from "@nestjs/common";
import { success } from "src/lib/response";
import { AccessibilityStatementService } from "./accessibility-statement.service";

@Controller("accessibility-statement")
export class AccessibilityStatementController {
constructor(private readonly accessibilityStatementService: AccessibilityStatementService) {}

@Get('website/:name')
async findOne(@Param('name') name: string) {
return success(await this.accessibilityStatementService.findByWebsiteName(name));
constructor(
private readonly accessibilityStatementService: AccessibilityStatementService
) {}

@Get("website/:name")
async findOne(@Param("name") name: string) {
return success(
await this.accessibilityStatementService.findByWebsiteName(name)
);
}

@Get()
async findAll() {
return success(await this.accessibilityStatementService.getASList());
}

@Get('id/:id')
async findOneById(@Param('id') id: number) {
@Get("id/:id")
async findOneById(@Param("id") id: number) {
return success(await this.accessibilityStatementService.findById(id));
}

@Get('year')
@Get("year")
async findAllByYear() {
return success(await this.accessibilityStatementService.getByAge());
}

@Get('conformance')
@Get("conformance")
async findAllByConformance() {
return success(await this.accessibilityStatementService.getByConformance());
}

@Get('seal')
@Get("seal")
async findAllBySeal() {
return success(await this.accessibilityStatementService.getBySeal());
}

@Get('state')
@Get("state")
async findAllByState() {
return success(await this.accessibilityStatementService.getByState());
}

@Get('directory/state')
@Get("directory/state")
async findAllByDirectoryState() {
return success(await this.accessibilityStatementService.getByDirectoryState());
return success(
await this.accessibilityStatementService.getByDirectoryState()
);
}

@Get('directory/seal')
@Get("directory/seal")
async findAllByDirectorySeal() {
return success(await this.accessibilityStatementService.getByDirectorySeal());
return success(
await this.accessibilityStatementService.getByDirectorySeal()
);
}

@Get('directory/conformance')
@Get("directory/conformance")
async findAllByDirectoryConformity() {
return success(await this.accessibilityStatementService.getByDirectoryConformity());
return success(
await this.accessibilityStatementService.getByDirectoryConformity()
);
}


@Get('directory/OPAW')
@Get("directory/OPAW")
async findAllByDirectoryWebsite() {
return success(await this.accessibilityStatementService.getOPAWTable());
}

@Get('evaluations')
@Get("evaluations")
async findNumberOfEvaluationByType() {
return success(await this.accessibilityStatementService.getNumberOfEvaluationByType());
return success(
await this.accessibilityStatementService.getNumberOfEvaluationByType()
);
}

/* @Post()
/* @Post()
create(@Body() createAccessibilityStatementDto: CreateAccessibilityStatementDto) {
return this.accessibilityStatementService.create(createAccessibilityStatementDto);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { Module } from '@nestjs/common';
import { AccessibilityStatementService } from './accessibility-statement.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AccessibilityStatement } from './entities/accessibility-statement.entity';
import { AutomaticEvaluationModule } from '../automatic-evaluation/automatic-evaluation.module';
import { ManualEvaluationModule } from '../manual-evaluation/manual-evaluation.module';
import { UserEvaluationModule } from '../user-evaluation/user-evaluation.module';
import { ContactModule } from '../contact/contact.module';
import { AccessibilityStatementController } from './accessibility-statement.controller';
import { Module } from "@nestjs/common";
import { AccessibilityStatementService } from "./accessibility-statement.service";
import { TypeOrmModule } from "@nestjs/typeorm";
import { AccessibilityStatement } from "./entities/accessibility-statement.entity";
import { AutomaticEvaluationModule } from "../automatic-evaluation/automatic-evaluation.module";
import { ManualEvaluationModule } from "../manual-evaluation/manual-evaluation.module";
import { UserEvaluationModule } from "../user-evaluation/user-evaluation.module";
import { ContactModule } from "../contact/contact.module";
import { AccessibilityStatementController } from "./accessibility-statement.controller";

@Module({
controllers: [AccessibilityStatementController],
imports: [
TypeOrmModule.forFeature([AccessibilityStatement]), AutomaticEvaluationModule, ManualEvaluationModule, UserEvaluationModule, ContactModule],
TypeOrmModule.forFeature([AccessibilityStatement]),
AutomaticEvaluationModule,
ManualEvaluationModule,
UserEvaluationModule,
ContactModule,
],
providers: [AccessibilityStatementService],
exports: [AccessibilityStatementService]
exports: [AccessibilityStatementService],
})
export class AccessibilityStatementModule { }
export class AccessibilityStatementModule {}
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { Test, TestingModule } from '@nestjs/testing';
import { AccessibilityStatementService } from './accessibility-statement.service';
import { Test, TestingModule } from "@nestjs/testing";
import { AccessibilityStatementService } from "./accessibility-statement.service";

describe('AccessibilityStatementService', () => {
describe("AccessibilityStatementService", () => {
let service: AccessibilityStatementService;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [AccessibilityStatementService],
}).compile();

service = module.get<AccessibilityStatementService>(AccessibilityStatementService);
service = module.get<AccessibilityStatementService>(
AccessibilityStatementService
);
});

it('should be defined', () => {
it("should be defined", () => {
expect(service).toBeDefined();
});
});
Loading

0 comments on commit dfc0bef

Please sign in to comment.