Fixed all preview urls

This commit is contained in:
DrMint 2024-04-12 22:02:37 +02:00
parent afc8cde2c2
commit 47f8a12042
7 changed files with 9 additions and 7 deletions

View File

@ -21,3 +21,5 @@ SFTP_USERNAME=someuser
SFTP_HOST=host.com
SFTP_DESTINATION_PATH_ROOT="/absolute/path/to/destination/root/folder"
SFTP_BASE_URL=https://base-url.com
PAYLOAD_PUBLIC_FRONTEND_BASE_URL=https://domain.com

View File

@ -28,7 +28,7 @@ export const Audios = buildCollectionConfig({
defaultSort: fields.updatedAt,
admin: {
group: CollectionGroups.Media,
preview: ({ slug }) => `https://v3.accords-library.com/en/audios/${slug}`,
preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/audios/${id}`,
defaultColumns: [
fields.filename,
fields.thumbnail,

View File

@ -128,7 +128,7 @@ export const Collectibles = buildVersionedCollectionConfig({
"A physical or digital item. This can be a book, a CD/DVD, a video game copy...\
any product related to our Scope.\
This can also include merchandises such as figurines, music boxes, posters, key chains...",
preview: ({ slug }) => `https://v3.accords-library.com/en/collectibles/${slug}`,
preview: ({ slug }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/collectibles/${slug}`,
hooks: {
beforeDuplicate: beforeDuplicatePiping([
beforeDuplicateUnpublish,

View File

@ -38,7 +38,7 @@ export const Folders = buildCollectionConfig({
],
description:
"Folders provide a way to structure our content. A folder can contain subfolders and/or files.",
preview: ({ slug }) => `https://v3.accords-library.com/en/folders/${slug}`,
preview: ({ slug }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/folders/${slug}`,
},
endpoints: [getBySlugEndpoint],
fields: [

View File

@ -26,7 +26,7 @@ export const Images = buildImageCollectionConfig({
plural: "Images",
},
admin: {
preview: ({ slug }) => `https://v3.accords-library.com/en/images/${slug}`,
preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/images/${id}`,
defaultColumns: [fields.filename, fields.posts, fields.updatedAt],
},
upload: {

View File

@ -53,7 +53,7 @@ export const Pages = buildVersionedCollectionConfig({
fields.folders,
],
group: CollectionGroups.Collections,
preview: ({ slug }) => `https://v3.accords-library.com/en/pages/${slug}`,
preview: ({ slug }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/pages/${slug}`,
components: {
BeforeListTable: [
() =>

View File

@ -37,7 +37,7 @@ export const Videos = buildCollectionConfig({
defaultSort: fields.updatedAt,
admin: {
group: CollectionGroups.Media,
preview: ({ slug }) => `https://v3.accords-library.com/en/videos/${slug}`,
preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/videos/${id}`,
defaultColumns: [
fields.filename,
fields.thumbnail,