diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 36b769fa..578dddb4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ # Each line is a file pattern followed by one or more owners. These owners will be the default owners for everything in the repo. Unless a later match takes precedence,e ach owner will be requested for review when someone opens a pull request. -* @samanthaandrews @jackiequach @kristojorg @Toxiapo @oliviawongnyc +* @samanthaandrews @jackiequach @kylevillegas93 diff --git a/.github/workflows/build-production.yaml b/.github/workflows/build-production.yaml index e7b307a0..5de7ee0e 100644 --- a/.github/workflows/build-production.yaml +++ b/.github/workflows/build-production.yaml @@ -85,4 +85,4 @@ jobs: - name: Force ECS Update run: | - aws ecs update-service --cluster sfr-front-end-production --service sfr-front-end-production --force-new-deployment + aws ecs update-service --cluster sfr-frontend-production-tf --service sfr-frontend-production-tf --force-new-deployment diff --git a/.github/workflows/build-qa.yml b/.github/workflows/build-qa.yml index 2a32088f..6e3d7134 100644 --- a/.github/workflows/build-qa.yml +++ b/.github/workflows/build-qa.yml @@ -51,9 +51,5 @@ jobs: docker push $ECR_REGISTRY/$ECR_REPOSITORY:qa-latest - name: Force ECS Update - run: | - aws ecs update-service --cluster sfr-front-end-qa --service sfr-front-end-qa --force-new-deployment - - - name: Force ECS Update - Terraform run: | aws ecs update-service --cluster sfr-frontend-qa-tf --service sfr-frontend-qa-tf --force-new-deployment diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dfeaaba..65932176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## [Prerelease] +## [0.18.10] + +- Remove Kristo, Jiayong, and Olivia and add Kyle as codeowners +- Deploy to new Terraform ECS cluster in production +- Deploy only to the new Terraform ECS clusters +- Update API endpoints to plural nouns + ## [0.18.9] - Enable playwright tests GH action diff --git a/config/appConfig.ts b/config/appConfig.ts index 7dfdeb75..603fa0a3 100644 --- a/config/appConfig.ts +++ b/config/appConfig.ts @@ -13,11 +13,11 @@ const appConfig = { production: "http://drb-api-qa.nypl.org", }, searchPath: "/search", - recordPath: "/work", - editionPath: "/edition", - readPath: "/link", + recordPath: "/works", + editionPath: "/editions", + readPath: "/links", languagesPath: "/utils/languages", - collectionPath: "/collection", + collectionPath: "/collections", }, booksCount: { apiUrl: "/utils/counts", diff --git a/mocks/mockEnv.ts b/mocks/mockEnv.ts index 34373aa8..451550b0 100644 --- a/mocks/mockEnv.ts +++ b/mocks/mockEnv.ts @@ -5,5 +5,5 @@ export const LIMITED_ACCESS_EDITION_PATH = "/edition/6977884"; export const WORK_PATH = "/work/5950e6df-9d99-42fe-8924-1116166a2acb"; export const DOWNLOAD_PATH = "/test-download-pdf"; export const HOME_PATH = "/"; -export const COLLECTION_LIST_PATH = "/collection/list"; +export const COLLECTION_LIST_PATH = "/collections"; export const INVALID_COLLECTION_PATH = "/collection/invalid-collection"; diff --git a/package-lock.json b/package-lock.json index 5c6866dd..bf6229e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sfr-bookfinder-front-end", - "version": "0.18.9", + "version": "0.18.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sfr-bookfinder-front-end", - "version": "0.18.9", + "version": "0.18.10", "dependencies": { "@chakra-ui/react": "2.5.4", "@newrelic/next": "0.10.0", diff --git a/package.json b/package.json index 56c8cd78..aa0f32c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sfr-bookfinder-front-end", - "version": "0.18.9", + "version": "0.18.10", "private": true, "scripts": { "dev": "next dev", diff --git a/src/__tests__/fixtures/CollectionFixture.ts b/src/__tests__/fixtures/CollectionFixture.ts index a29948df..077af333 100644 --- a/src/__tests__/fixtures/CollectionFixture.ts +++ b/src/__tests__/fixtures/CollectionFixture.ts @@ -188,7 +188,7 @@ export const oneCollectionListData: Opds2Feed = { ], links: [ { - href: "/collection/list?page=1", + href: "/collections?page=1", rel: ["self", "first", "previous", "next", "last"], type: "application/opds+json", }, @@ -1721,7 +1721,7 @@ export const collectionListData: CollectionResult = { ], links: [ { - href: "/collection/list?page=1", + href: "/collections?page=1", rel: ["self", "first", "previous", "next", "last"], type: "application/opds+json", }, diff --git a/src/lib/api/CollectionApi.ts b/src/lib/api/CollectionApi.ts index 190bda48..255bdcd5 100644 --- a/src/lib/api/CollectionApi.ts +++ b/src/lib/api/CollectionApi.ts @@ -15,7 +15,10 @@ const collectionUrl = apiUrl + collectionPath; export const collectionFetcher = async (query: CollectionQuery) => { const collectionApiQuery = toApiCollectionQuery(query); - const url = new URL(collectionUrl + "/" + query.identifier); + const urlWithIdentifier = query.identifier + ? collectionUrl + "/" + query.identifier + : collectionUrl; + const url = new URL(urlWithIdentifier); url.search = new URLSearchParams( toLocationQuery(collectionApiQuery) ).toString(); diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 85c6e37c..e5e833ec 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -9,7 +9,6 @@ import Error from "./_error"; export async function getServerSideProps() { // Fetch all collections const collectionResult: CollectionResult = await collectionFetcher({ - identifier: "list", perPage: 8, }); diff --git a/src/types/CollectionQuery.ts b/src/types/CollectionQuery.ts index 7ec689f9..2cb32fec 100644 --- a/src/types/CollectionQuery.ts +++ b/src/types/CollectionQuery.ts @@ -6,7 +6,7 @@ export type ApiCollectionQuery = { }; export type CollectionQuery = { - identifier: string; + identifier?: string; page?: number; perPage?: number; sort?: string;