Skip to content

Commit

Permalink
feat(DTFS2-7052): moving address examples to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
avaitonis committed Apr 25, 2024
1 parent 6bf5a4d commit de7a0e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/constants/geospatial.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export const GEOSPATIAL = {
},
EXAMPLES: {
POSTCODE: 'SW1A 2AQ',
ORGANISATION_NAME: 'CHURCHILL MUSEUM & CABINET WAR ROOMS',
ADDRESS_LINE_1: 'CLIVE STEPS KING CHARLES STREET',
LOCALITY: 'LONDON',
},
REGEX: {
// UK postcode regex is from DTFS project and slightly optimised by lint.
Expand Down
6 changes: 3 additions & 3 deletions src/modules/geospatial/dto/get-addresses-response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ export type GetAddressesResponse = GetAddressesResponseItem[];
export class GetAddressesResponseItem {
@ApiProperty({
description: 'Organisation name if available',
example: 'CHURCHILL MUSEUM & CABINET WAR ROOMS',
example: GEOSPATIAL.EXAMPLES.ORGANISATION_NAME,
})
readonly organisationName: string | null;

@ApiProperty({
description: 'Address line 1',
example: 'CLIVE STEPS KING CHARLES STREET',
example: GEOSPATIAL.EXAMPLES.ADDRESS_LINE_1,
})
readonly addressLine1: string;

Expand All @@ -30,7 +30,7 @@ export class GetAddressesResponseItem {

@ApiProperty({
description: 'Locality, Town',
example: 'LONDON',
example: GEOSPATIAL.EXAMPLES.LOCALITY,
})
readonly locality: string | null;

Expand Down

0 comments on commit de7a0e5

Please sign in to comment.