Spaces:
Running
Running
Bibhu Mishra
Add GitHub Actions CI/CD, HF Space deployment, market hours guard, and static serving
abc493d | import { Injectable } from '@nestjs/common'; | |
| import { InjectRepository } from '@nestjs/typeorm'; | |
| import { Repository } from 'typeorm'; | |
| import { Setting } from '../common/entities/setting.entity'; | |
| () | |
| export class SettingsService { | |
| constructor((Setting) private repo: Repository<Setting>) {} | |
| findAll() { return this.repo.find(); } | |
| async update(updates: Record<string, string>) { | |
| for (const [key, value] of Object.entries(updates)) { | |
| await this.repo.upsert({ key, value: String(value) }, ['key']); | |
| } | |
| return this.repo.find(); | |
| } | |
| } | |