Update Taglines pt 2 (#81)

* Add Tagline structs

* updated is an option<string>

* Address PR Comments

* Move taglines to siteres

* Add Type
This commit is contained in:
Anon 2022-11-19 18:17:09 -06:00 committed by GitHub
parent ab6eda43f7
commit dbc846bb44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ import { Expose, Transform, Type } from "class-transformer";
import "reflect-metadata"; import "reflect-metadata";
import { toOption, toUndefined } from "../../utils"; import { toOption, toUndefined } from "../../utils";
import { ListingType, ModlogActionType, SearchType, SortType } from "../others"; import { ListingType, ModlogActionType, SearchType, SortType } from "../others";
import { Language } from "../source"; import { Language, Tagline } from "../source";
import { import {
AdminPurgeCommentView, AdminPurgeCommentView,
AdminPurgeCommunityView, AdminPurgeCommunityView,
@ -550,6 +550,11 @@ export class GetSiteResponse {
@Type(() => Language) @Type(() => Language)
all_languages: Language[]; all_languages: Language[];
discussion_languages: number[]; discussion_languages: number[];
@Transform(({ value }) => toOption(value), { toClassOnly: true })
@Transform(({ value }) => toUndefined(value), { toPlainOnly: true })
@Expose()
@Type(() => Tagline)
taglines: Option<Tagline[]>;
} }
/** /**