From 9907d7ffd8295809fe9a4d71d07e31ebd1450274 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Tue, 5 Nov 2024 14:36:48 -0300 Subject: [PATCH] fix(updateInstanceController): allow for setting the tagline --- src/controllers/api/ditto.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/api/ditto.ts b/src/controllers/api/ditto.ts index 77bb32ba..5d51027e 100644 --- a/src/controllers/api/ditto.ts +++ b/src/controllers/api/ditto.ts @@ -297,6 +297,8 @@ const updateInstanceSchema = z.object({ title: z.string().optional(), description: z.string().optional(), /** Mastodon doesn't have this field. */ + short_description: z.string().optional(), + /** Mastodon doesn't have this field. */ screenshot_ids: z.string().array().nullish(), /** Mastodon doesn't have this field. */ thumbnail_id: z.string().optional(), @@ -318,6 +320,7 @@ export const updateInstanceController: AppController = async (c) => { const { title, description, + short_description, screenshot_ids, thumbnail_id, } = result.data; @@ -360,6 +363,7 @@ export const updateInstanceController: AppController = async (c) => { meta.name = title ?? meta.name; meta.about = description ?? meta.about; + meta.tagline = short_description ?? meta.tagline; meta.screenshots = screenshot_ids ? screenshots : meta.screenshots; meta.picture = thumbnailUrl ?? meta.picture; delete meta.event;