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_HOST=host.com
SFTP_DESTINATION_PATH_ROOT="/absolute/path/to/destination/root/folder" SFTP_DESTINATION_PATH_ROOT="/absolute/path/to/destination/root/folder"
SFTP_BASE_URL=https://base-url.com 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, defaultSort: fields.updatedAt,
admin: { admin: {
group: CollectionGroups.Media, 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: [ defaultColumns: [
fields.filename, fields.filename,
fields.thumbnail, 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...\ "A physical or digital item. This can be a book, a CD/DVD, a video game copy...\
any product related to our Scope.\ any product related to our Scope.\
This can also include merchandises such as figurines, music boxes, posters, key chains...", 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: { hooks: {
beforeDuplicate: beforeDuplicatePiping([ beforeDuplicate: beforeDuplicatePiping([
beforeDuplicateUnpublish, beforeDuplicateUnpublish,

View File

@ -38,7 +38,7 @@ export const Folders = buildCollectionConfig({
], ],
description: description:
"Folders provide a way to structure our content. A folder can contain subfolders and/or files.", "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], endpoints: [getBySlugEndpoint],
fields: [ fields: [

View File

@ -26,7 +26,7 @@ export const Images = buildImageCollectionConfig({
plural: "Images", plural: "Images",
}, },
admin: { 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], defaultColumns: [fields.filename, fields.posts, fields.updatedAt],
}, },
upload: { upload: {

View File

@ -53,7 +53,7 @@ export const Pages = buildVersionedCollectionConfig({
fields.folders, fields.folders,
], ],
group: CollectionGroups.Collections, 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: { components: {
BeforeListTable: [ BeforeListTable: [
() => () =>

View File

@ -37,7 +37,7 @@ export const Videos = buildCollectionConfig({
defaultSort: fields.updatedAt, defaultSort: fields.updatedAt,
admin: { admin: {
group: CollectionGroups.Media, 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: [ defaultColumns: [
fields.filename, fields.filename,
fields.thumbnail, fields.thumbnail,