mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-11 10:27:01 +02:00
* add first concept * completed configuration ui update * add button for testing email configuration * improve mobile layout * add migration * run formatter * delete unnecessary modal * remove unused comment
32 lines
631 B
TypeScript
32 lines
631 B
TypeScript
import { Expose, plainToClass } from "class-transformer";
|
|
import { ConfigDTO } from "./config.dto";
|
|
|
|
export class AdminConfigDTO extends ConfigDTO {
|
|
@Expose()
|
|
secret: boolean;
|
|
|
|
@Expose()
|
|
updatedAt: Date;
|
|
|
|
@Expose()
|
|
description: string;
|
|
|
|
@Expose()
|
|
obscured: boolean;
|
|
|
|
@Expose()
|
|
category: string;
|
|
|
|
from(partial: Partial<AdminConfigDTO>) {
|
|
return plainToClass(AdminConfigDTO, partial, {
|
|
excludeExtraneousValues: true,
|
|
});
|
|
}
|
|
|
|
fromList(partial: Partial<AdminConfigDTO>[]) {
|
|
return partial.map((part) =>
|
|
plainToClass(AdminConfigDTO, part, { excludeExtraneousValues: true })
|
|
);
|
|
}
|
|
}
|