mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Merge branch 'add-short-description-field' into 'main'
fix(updateInstanceController): allow for setting the tagline See merge request soapbox-pub/ditto!581
This commit is contained in:
commit
840cacd561
1 changed files with 4 additions and 0 deletions
|
|
@ -297,6 +297,8 @@ const updateInstanceSchema = z.object({
|
||||||
title: z.string().optional(),
|
title: z.string().optional(),
|
||||||
description: z.string().optional(),
|
description: z.string().optional(),
|
||||||
/** Mastodon doesn't have this field. */
|
/** Mastodon doesn't have this field. */
|
||||||
|
short_description: z.string().optional(),
|
||||||
|
/** Mastodon doesn't have this field. */
|
||||||
screenshot_ids: z.string().array().nullish(),
|
screenshot_ids: z.string().array().nullish(),
|
||||||
/** Mastodon doesn't have this field. */
|
/** Mastodon doesn't have this field. */
|
||||||
thumbnail_id: z.string().optional(),
|
thumbnail_id: z.string().optional(),
|
||||||
|
|
@ -318,6 +320,7 @@ export const updateInstanceController: AppController = async (c) => {
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
|
short_description,
|
||||||
screenshot_ids,
|
screenshot_ids,
|
||||||
thumbnail_id,
|
thumbnail_id,
|
||||||
} = result.data;
|
} = result.data;
|
||||||
|
|
@ -360,6 +363,7 @@ export const updateInstanceController: AppController = async (c) => {
|
||||||
|
|
||||||
meta.name = title ?? meta.name;
|
meta.name = title ?? meta.name;
|
||||||
meta.about = description ?? meta.about;
|
meta.about = description ?? meta.about;
|
||||||
|
meta.tagline = short_description ?? meta.tagline;
|
||||||
meta.screenshots = screenshot_ids ? screenshots : meta.screenshots;
|
meta.screenshots = screenshot_ids ? screenshots : meta.screenshots;
|
||||||
meta.picture = thumbnailUrl ?? meta.picture;
|
meta.picture = thumbnailUrl ?? meta.picture;
|
||||||
delete meta.event;
|
delete meta.event;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue