From 26b5cb2ca0fbb78da27f8e82cc0f87a81a117164 Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Wed, 15 Nov 2023 18:24:52 -0800 Subject: [PATCH] added back jsonexport --- backend/src/routes/district-router.js | 14 ++++++-------- backend/src/routes/download-router.js | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/backend/src/routes/district-router.js b/backend/src/routes/district-router.js index ec1f7d09..d088b3e5 100644 --- a/backend/src/routes/district-router.js +++ b/backend/src/routes/district-router.js @@ -117,8 +117,8 @@ async function getAllDistrictContacts(req, res) { headers: { Authorization: `Bearer ${req.accessToken}` }, }); const propertyOrder = [ - { property: "displayName", label: "District Name" }, { property: "districtNumber", label: "District Number" }, + { property: "displayName", label: "District Name" }, { property: "districtContactTypeCode", label: "District Contact" }, { property: "description", label: "Contact Description" }, { property: "firstName", label: "Contact First Name" }, @@ -152,26 +152,24 @@ async function getAllDistrictMailing(req, res) { const contactTypeCodes= await listCache.get("codesList") const propertyOrder = [ + { property: "districtNumber", label: "District Number" }, { property: "displayName", label: "District Name" }, - { property: "districtNumber", label: "districtNumber" }, { property: "mailingAddressLine1", label: "Address Line 1" }, { property: "mailingAddressLine2", label: "Address Line 2" }, { property: "mailingCity", label: "City" }, - { property: "mailingPostal", label: "Postal" }, { property: "mailingProvinceCode", label: "Province" }, + { property: "mailingPostal", label: "Postal Code" }, { property: "mailingCountryCode", label: "Country" }, - { property: "physicalAddressLine1", label: "Courier Address Line 1" }, { property: "physicalAddressLine2", label: "Courier Address Line 2" }, { property: "physicalCity", label: "Courier City" }, - { property: "physicalPostal", label: "Courier Postal" }, { property: "physicalProvinceCode", label: "Courier Province" }, + { property: "physicalPostal", label: "Courier Postal Code" }, { property: "physicalCountryCode", label: "Courier Country" }, - { property: "districtRegionCode", label: "Courier Region" }, + { property: "website", label: "Web Address" }, { property: "phoneNumber", label: "Phone" }, { property: "faxNumber", label: "Fax" }, - { property: "email", label: "Email" }, - { property: "website", label: "Website" }, + ]; diff --git a/backend/src/routes/download-router.js b/backend/src/routes/download-router.js index a091daeb..15fcf21c 100644 --- a/backend/src/routes/download-router.js +++ b/backend/src/routes/download-router.js @@ -4,7 +4,7 @@ const log = require("../components/logger"); const config = require("../config/index"); const axios = require("axios"); const { checkToken } = require("../components/auth"); -const jsonexport = require("jsonexport/dist") +const jsonExport = require('jsonexport'); const fs = require('fs'); const path = require('path'); const {isSafeFilePath} = require("../components/utils")