Skip to content

Commit

Permalink
Feature/ce 35v2 (#163)
Browse files Browse the repository at this point in the history
Co-authored-by: afwilcox <[email protected]>
  • Loading branch information
marqueone-ps and afwilcox authored Oct 25, 2023
1 parent 470e92a commit 2131732
Show file tree
Hide file tree
Showing 26 changed files with 1,624 additions and 362 deletions.
17 changes: 17 additions & 0 deletions backend/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Backend",
"request": "attach",
"port": 9229,
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
},
]
}
14 changes: 14 additions & 0 deletions backend/package-lock.json

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

1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"geojson": "^0.5.0",
"jest-mock": "^29.6.1",
"jwks-rsa": "^3.0.1",
"linq-to-typescript": "^11.0.0",
"nest-winston": "^1.9.2",
"passport": "^0.6.0",
"passport-jwt": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ async function bootstrap() {
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup("api", app, document);

await app.listen(3000);
await app.listen(parseInt(process.env.PORT, 10) || 3000);
}
bootstrap();
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { ApiTags } from "@nestjs/swagger";
import { Roles } from "../../auth/decorators/roles.decorator";
import { Role } from "../../enum/role.enum";
import { UUID } from "crypto";
import { AllegationSearchOptions } from "../../types/complaints/allegation_search_options";

@UseGuards(JwtRoleGuard)
@ApiTags("allegation-complaint")
Expand Down Expand Up @@ -60,25 +59,22 @@ export class AllegationComplaintController {
@Query("incidentReportedEnd") incidentReportedEnd: string,
@Query("status") status,
@Query('page') page: number,
@Query('pageSize') pageSize: number) {

const options: AllegationSearchOptions = {
community: community,
zone: zone,
region: region,
officerAssigned: officerAssigned,
violationCode: violationCode,
incidentReportedStart: incidentReportedStart,
incidentReportedEnd: incidentReportedEnd,
status: status,
};

@Query('pageSize') pageSize: number,
@Query("query") query: string,) {
return this.allegationComplaintService.search(
sortColumn,
sortOrder,
options,
community,
zone,
region,
officerAssigned,
violationCode,
incidentReportedStart,
incidentReportedEnd,
status,
page,
pageSize,
query
);
}

Expand All @@ -96,22 +92,17 @@ export class AllegationComplaintController {
@Query("incidentReportedEnd") incidentReportedEnd: string,
@Query("status") status
) {

const options: AllegationSearchOptions = {
community: community,
zone: zone,
region: region,
officerAssigned: officerAssigned,
violationCode: violationCode,
incidentReportedStart: incidentReportedStart,
incidentReportedEnd: incidentReportedEnd,
status: status,
};

return this.allegationComplaintService.searchMap(
sortColumn,
sortOrder,
options,
community,
zone,
region,
officerAssigned,
violationCode,
incidentReportedStart,
incidentReportedEnd,
status,
);
}

Expand Down
Loading

0 comments on commit 2131732

Please sign in to comment.