import { About } from '@shared/models'
import { environment } from '../../../environments/environment'
+export type AboutHTML = Pick<About['instance'],
+'terms' | 'codeOfConduct' | 'moderationInformation' | 'administrator' | 'creationReason' |
+'maintenanceLifetime' | 'businessModel' | 'hardwareInformation'
+>
+
@Injectable()
export class InstanceService {
private static BASE_CONFIG_URL = environment.apiUrl + '/api/v1/config'
}
async buildHtml (about: About) {
- const html = {
+ const html: AboutHTML = {
terms: '',
codeOfConduct: '',
moderationInformation: '',
}
for (const key of Object.keys(html)) {
- html[ key ] = await this.markdownService.textMarkdownToHTML(about.instance[ key ])
+ html[key] = await this.markdownService.textMarkdownToHTML({ markdown: about.instance[key] })
}
return html