2025-08-24 02:31:42 +08:00
|
|
|
import { Injectable } from '@nestjs/common';
|
2025-08-23 13:20:01 +08:00
|
|
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
|
|
|
import { Repository } from 'typeorm';
|
|
|
|
|
import { Site } from './site.entity';
|
|
|
|
|
import { UpdateSiteSettingsDto } from './site-settings.dto';
|
2025-08-28 05:19:14 +08:00
|
|
|
|
|
|
|
|
// 不允许硬编码,从配置系统获取
|
|
|
|
|
// TODO: 配置系统重构中,此功能暂时不可用
|
2025-08-23 13:20:01 +08:00
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
|
export class SiteSettingsService {
|
|
|
|
|
constructor(
|
|
|
|
|
@InjectRepository(Site)
|
|
|
|
|
private readonly siteRepository: Repository<Site>,
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取站点设置
|
|
|
|
|
*/
|
2025-08-28 05:19:14 +08:00
|
|
|
getSiteSettings() {
|
|
|
|
|
// 配置系统重构中,此功能暂时不可用
|
|
|
|
|
throw new Error('配置系统重构中,站点设置功能暂时不可用');
|
2025-08-23 13:20:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新站点设置
|
|
|
|
|
*/
|
2025-08-28 05:19:14 +08:00
|
|
|
updateSiteSettings(updateSiteSettingsDto: UpdateSiteSettingsDto) {
|
|
|
|
|
// 配置系统重构中,此功能暂时不可用
|
|
|
|
|
throw new Error('配置系统重构中,站点设置更新功能暂时不可用');
|
2025-08-23 13:20:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 重置站点设置为默认值
|
|
|
|
|
*/
|
2025-08-28 05:19:14 +08:00
|
|
|
resetSiteSettings() {
|
|
|
|
|
// 配置系统重构中,此功能暂时不可用
|
|
|
|
|
throw new Error('配置系统重构中,站点设置重置功能暂时不可用');
|
2025-08-23 13:20:01 +08:00
|
|
|
}
|
2025-08-27 11:24:22 +08:00
|
|
|
}
|