feat(settings): add Maintenance Mode, Catalog Mode, Brand Identity & UI Text management (TASK-2.14, TASK-2.15, TASK-2.16)
This commit is contained in:
1 parent
38c1e287dc
commit
88521c6bac
3 files changed
+118
-32
No files matched your search
@@ -397,19 +397,8 @@ export class AdminService {
|
||||
});
|
||||
}
|
||||
|
||||
// --- Settings ---
|
||||
async getSettings() {
|
||||
const keys = [
|
||||
'SHIPPING_FEE',
|
||||
'MIN_ORDER_AMOUNT',
|
||||
'B2B_DISCOUNT_PERCENT',
|
||||
'MAINTENANCE_MODE',
|
||||
];
|
||||
const settings = await this.prisma.uiText.findMany({
|
||||
where: { key: { in: keys } },
|
||||
});
|
||||
|
||||
// Transform to an object { SHIPPING_FEE: '50000', ... }
|
||||
const settings = await this.prisma.uiText.findMany();
|
||||
return settings.reduce(
|
||||
(acc, curr) => ({ ...acc, [curr.key]: curr.value }),
|
||||
{},
|
||||
|
||||
Reference in new issue
Block a user