@@ -20,6 +20,7 @@ import {
|
||||
normalizeSignupBlockedUsernames,
|
||||
parseSignupBlockedUsernamesFromDb
|
||||
} from '../../lib/signup-blocked-usernames.js'
|
||||
import { normalizePostTagLimit } from '../../lib/post-tag-limit.js'
|
||||
import { normalizeSocialLinks } from '../../lib/social-links.js'
|
||||
import {
|
||||
createPostThumbnailForImageUrl,
|
||||
@@ -116,6 +117,7 @@ const mapSiteSettingsRow = (row) => ({
|
||||
copyrightText: row.copyright_text,
|
||||
socialLinks: normalizeSocialLinks(row.social_links),
|
||||
showPostUpdatedAt: Boolean(row.show_post_updated_at),
|
||||
postTagLimit: normalizePostTagLimit(row.post_tag_limit),
|
||||
homeCoverImageUrl: row.home_cover_image_url || '',
|
||||
homeCoverDarkImageUrl: row.home_cover_dark_image_url || '',
|
||||
homeCoverTitle: row.home_cover_title || '',
|
||||
@@ -903,6 +905,7 @@ export const updateSiteSettings = async (input) => {
|
||||
copyright_text,
|
||||
social_links,
|
||||
show_post_updated_at,
|
||||
post_tag_limit,
|
||||
home_cover_image_url,
|
||||
home_cover_dark_image_url,
|
||||
home_cover_title,
|
||||
@@ -937,6 +940,7 @@ export const updateSiteSettings = async (input) => {
|
||||
${input.copyrightText},
|
||||
${JSON.stringify(normalizeSocialLinks(input.socialLinks))}::jsonb,
|
||||
${input.showPostUpdatedAt ? true : false},
|
||||
${normalizePostTagLimit(input.postTagLimit)},
|
||||
${input.homeCoverImageUrl || ''},
|
||||
${input.homeCoverDarkImageUrl || ''},
|
||||
${input.homeCoverTitle || ''},
|
||||
@@ -971,6 +975,7 @@ export const updateSiteSettings = async (input) => {
|
||||
copyright_text = EXCLUDED.copyright_text,
|
||||
social_links = EXCLUDED.social_links,
|
||||
show_post_updated_at = EXCLUDED.show_post_updated_at,
|
||||
post_tag_limit = EXCLUDED.post_tag_limit,
|
||||
home_cover_image_url = EXCLUDED.home_cover_image_url,
|
||||
home_cover_dark_image_url = EXCLUDED.home_cover_dark_image_url,
|
||||
home_cover_title = EXCLUDED.home_cover_title,
|
||||
|
||||
Reference in New Issue
Block a user