Skip to content

Commit

Permalink
Merge pull request #165 from companieshouse/feature/remove-idv-rle-fu…
Browse files Browse the repository at this point in the history
…nctionality

Removal of redundant views and associated routers from web
  • Loading branch information
AlisonGriffiths authored Nov 6, 2024
2 parents 5c77add + e2b6461 commit 9f5b13d
Show file tree
Hide file tree
Showing 19 changed files with 4 additions and 582 deletions.
12 changes: 1 addition & 11 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ export const Urls = {
PERSONAL_CODE: `${urlWithTransactionIdAndSubmissionId}/individual/personal-code`,
INDIVIDUAL_STATEMENT: `${urlWithTransactionIdAndSubmissionId}/individual/psc-statement`,
PSC_VERIFIED: `${urlWithTransactionIdAndSubmissionId}/psc-verified`,
RLE_LIST: `${urlWithTransactionIdAndSubmissionId}/rle/rle-list`,
RLE_DETAILS: "/rle/ro-details",
RLE_DIRECTOR: "/rle/ro-director",
CONFIRM_RO_STATEMENTS: "/rle/ro-statements",
NOT_A_DIRECTOR: "/rle/not-director-stop",
RLE_VERIFIED: "/rle/rle-verified"
RLE_LIST: `${urlWithTransactionIdAndSubmissionId}/rle/rle-list`
} as const;

export const PrefixedUrls = {
Expand All @@ -34,11 +29,6 @@ export const PrefixedUrls = {
INDIVIDUAL_STATEMENT: servicePathPrefix + Urls.INDIVIDUAL_STATEMENT,
PSC_VERIFIED: servicePathPrefix + Urls.PSC_VERIFIED,
RLE_LIST: servicePathPrefix + Urls.RLE_LIST,
RLE_DETAILS: servicePathPrefix + Urls.RLE_DETAILS,
RLE_DIRECTOR: servicePathPrefix + Urls.RLE_DIRECTOR,
CONFIRM_RO_STATEMENTS: servicePathPrefix + Urls.CONFIRM_RO_STATEMENTS,
NOT_A_DIRECTOR: servicePathPrefix + Urls.NOT_A_DIRECTOR,
RLE_VERIFIED: servicePathPrefix + Urls.RLE_VERIFIED,
COOKIES: "/help/cookies"
} as const;

Expand Down
7 changes: 1 addition & 6 deletions src/routerDispatch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Do Router dispatch here, i.e. map incoming routes to appropriate router
import { Application, Request, Response, Router } from "express";
import { Urls, servicePathPrefix } from "./constants";
import { CompanyNumberRouter, ConfirmCompanyRouter, ConfirmRoStatementsRouter, HealthCheckRouter, IndividualPscListRouter, IndividualStatementRouter, NewSubmissionRouter, NotADirectorRouter, PersonalCodeRouter, PscTypeRouter, PscVerifiedRouter, RleDetailsRouter, RleDirectorRouter, RlePscListRouter, RleVerifiedRouter, StartRouter } from "./routers/utils";
import { CompanyNumberRouter, ConfirmCompanyRouter, HealthCheckRouter, IndividualPscListRouter, IndividualStatementRouter, NewSubmissionRouter, PersonalCodeRouter, PscTypeRouter, PscVerifiedRouter, RlePscListRouter, StartRouter } from "./routers/utils";
import { authenticate } from "./middleware/authentication";
import { fetchVerification } from "./middleware/fetchVerification";
import { fetchCompany } from "./middleware/fetchCompany";
Expand All @@ -24,11 +24,6 @@ const routerDispatch = (app: Application) => {
router.use(Urls.INDIVIDUAL_STATEMENT, authenticate, fetchVerification, IndividualStatementRouter);
router.use(Urls.PSC_VERIFIED, authenticate, fetchVerification, fetchCompany, PscVerifiedRouter);
router.use(Urls.RLE_LIST, authenticate, RlePscListRouter);
router.use(Urls.RLE_DETAILS, authenticate, RleDetailsRouter);
router.use(Urls.RLE_DIRECTOR, authenticate, RleDirectorRouter);
router.use(Urls.CONFIRM_RO_STATEMENTS, authenticate, ConfirmRoStatementsRouter);
router.use(Urls.NOT_A_DIRECTOR, authenticate, NotADirectorRouter);
router.use(Urls.RLE_VERIFIED, authenticate, RleVerifiedRouter);

router.use("*", (req: Request, res: Response) => {
res.status(404).render("partials/error_400");
Expand Down
13 changes: 0 additions & 13 deletions src/routers/confirmRoStatementsRouter.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/routers/handlers/confirm-ro-statements/confirmRoStatements.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/routers/handlers/not-a-director/notADirector.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/routers/handlers/rle-details/rleDetails.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/routers/handlers/rle-director/rleDirector.ts

This file was deleted.

44 changes: 0 additions & 44 deletions src/routers/handlers/rle-verified/rleVerified.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/routers/notADirectorRouter.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/routers/rleDetailsRouter.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/routers/rleDirectorRouter.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/routers/rleVerifiedRouter.ts

This file was deleted.

8 changes: 2 additions & 6 deletions src/routers/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import PersonalCodeRouter from "../personalCodeRouter";
import IndividualStatementRouter from "../individualStatementRouter";
import PscVerifiedRouter from "./../pscVerifiedRouter";
import RlePscListRouter from "./../rlePscListRouter";
import RleDetailsRouter from "./../rleDetailsRouter";
import RleDirectorRouter from "./../rleDirectorRouter";
import ConfirmRoStatementsRouter from "./../confirmRoStatementsRouter";
import NotADirectorRouter from "./../notADirectorRouter";
import RleVerifiedRouter from "./../rleVerifiedRouter";

import { logger } from "../../lib/logger";
export { StartRouter, HealthCheckRouter, CompanyNumberRouter, ConfirmCompanyRouter, PscTypeRouter, IndividualPscListRouter, PersonalCodeRouter, IndividualStatementRouter, NewSubmissionRouter, NotADirectorRouter, PscVerifiedRouter, RlePscListRouter, RleDetailsRouter, RleDirectorRouter, RleVerifiedRouter, ConfirmRoStatementsRouter };
export { StartRouter, HealthCheckRouter, CompanyNumberRouter, ConfirmCompanyRouter, PscTypeRouter, IndividualPscListRouter, PersonalCodeRouter, IndividualStatementRouter, NewSubmissionRouter, PscVerifiedRouter, RlePscListRouter };

export function formatDateBorn (dateOfBirth: any, lang: string): string {
try {
Expand Down
Loading

0 comments on commit 9f5b13d

Please sign in to comment.