From 49c1e46fb818abf28392574353f546f10fad17f4 Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Fri, 22 Mar 2024 21:21:37 +0100 Subject: [PATCH] Fix chronology events --- src/collections/ChronologyEvents/ChronologyEvents.ts | 1 - src/collections/ChronologyEvents/endpoints/getByID.ts | 2 +- src/sdk.ts | 2 +- src/styles.scss | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/collections/ChronologyEvents/ChronologyEvents.ts b/src/collections/ChronologyEvents/ChronologyEvents.ts index e8ef299..241879b 100644 --- a/src/collections/ChronologyEvents/ChronologyEvents.ts +++ b/src/collections/ChronologyEvents/ChronologyEvents.ts @@ -110,7 +110,6 @@ export const ChronologyEvents: CollectionConfig = buildVersionedCollectionConfig { name: fields.eventsSources, type: "blocks", - maxRows: 1, blocks: [urlBlock, collectibleBlock, pageBlock], }, translatedFields({ diff --git a/src/collections/ChronologyEvents/endpoints/getByID.ts b/src/collections/ChronologyEvents/endpoints/getByID.ts index e4d5b7a..5c84ee5 100644 --- a/src/collections/ChronologyEvents/endpoints/getByID.ts +++ b/src/collections/ChronologyEvents/endpoints/getByID.ts @@ -5,7 +5,7 @@ import { eventToEndpointEvent } from "./getAllEndpoint"; export const getByID: CollectionEndpoint = { method: "get", - path: "/:id", + path: "/id/:id", handler: async (req, res) => { if (!req.user) { return res.status(403).send({ diff --git a/src/sdk.ts b/src/sdk.ts index 631f7b1..e3fb197 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -380,5 +380,5 @@ export const payload = { getChronologyEvents: async (): Promise => await (await request(payloadApiUrl(Collections.ChronologyEvents, `all`))).json(), getChronologyEventByID: async (id: string): Promise => - await (await request(payloadApiUrl(Collections.ChronologyEvents, id))).json(), + await (await request(payloadApiUrl(Collections.ChronologyEvents, `id/${id}`))).json(), }; diff --git a/src/styles.scss b/src/styles.scss index 4502b0f..aac8fbc 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -88,7 +88,6 @@ html[data-theme="light"] { } .collapsible__toggle-wrap:has( - .blocks-field__block-pill-collectibleBlock, .blocks-field__block-pill-page, .blocks-field__block-pill-timestamp, .blocks-field__block-pill-other,