refactor(server)!: move markers and style to dedicated map endpoint/controller (#9832)

* move markers and style to dedicated map endpoint

* chore: open api

* chore: clean up repos

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Daniel Dietzler 2024-05-29 17:51:01 +02:00 committed by GitHub
parent 5ef144bf79
commit 5463660746
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 980 additions and 839 deletions

View file

@ -31,7 +31,7 @@ export class SystemConfigService {
private core: SystemConfigCore;
constructor(
@Inject(ISystemMetadataRepository) private repository: ISystemMetadataRepository,
@Inject(ISystemMetadataRepository) repository: ISystemMetadataRepository,
@Inject(IEventRepository) private eventRepository: IEventRepository,
@Inject(ILoggerRepository) private logger: ILoggerRepository,
@Inject(ISearchRepository) private smartInfoRepository: ISearchRepository,
@ -109,17 +109,6 @@ export class SystemConfigService {
return options;
}
async getMapStyle(theme: 'light' | 'dark') {
const { map } = await this.getConfig();
const styleUrl = theme === 'dark' ? map.darkStyle : map.lightStyle;
if (styleUrl) {
return this.repository.fetchStyle(styleUrl);
}
return JSON.parse(await this.repository.readFile(`./resources/style-${theme}.json`));
}
async getCustomCss(): Promise<string> {
const { theme } = await this.core.getConfig();
return theme.customCss;