import { dataSource } from "../../data-source"; import { template } from "../../entity/settings/template"; import { member } from "../../entity/club/member/member"; import InternalException from "../../exceptions/internalException"; export default abstract class TemplateService { /** * @description get all templates * @returns {Promise>} */ static async getAll(): Promise> { return await dataSource .getRepository(template) .createQueryBuilder("template") .getMany() .then((res) => { return res; }) .catch((err) => { throw new InternalException("templates not found", err); }); } /** * @description get template by id * @returns {Promise