From dbc846bb4437f658747ef875289d509ae9ad640e Mon Sep 17 00:00:00 2001 From: Anon Date: Sat, 19 Nov 2022 18:17:09 -0600 Subject: [PATCH] Update Taglines pt 2 (#81) * Add Tagline structs * updated is an option * Address PR Comments * Move taglines to siteres * Add Type --- src/interfaces/api/site.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/interfaces/api/site.ts b/src/interfaces/api/site.ts index d558a71..d7279d4 100644 --- a/src/interfaces/api/site.ts +++ b/src/interfaces/api/site.ts @@ -3,7 +3,7 @@ import { Expose, Transform, Type } from "class-transformer"; import "reflect-metadata"; import { toOption, toUndefined } from "../../utils"; import { ListingType, ModlogActionType, SearchType, SortType } from "../others"; -import { Language } from "../source"; +import { Language, Tagline } from "../source"; import { AdminPurgeCommentView, AdminPurgeCommunityView, @@ -550,6 +550,11 @@ export class GetSiteResponse { @Type(() => Language) all_languages: Language[]; discussion_languages: number[]; + @Transform(({ value }) => toOption(value), { toClassOnly: true }) + @Transform(({ value }) => toUndefined(value), { toPlainOnly: true }) + @Expose() + @Type(() => Tagline) + taglines: Option; } /**