chore: commit pending admin-panel, api auth and parity doc changes
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 5.5
parent
55856cac89
commit
cf014e1f6c
@@ -1,7 +1,7 @@
|
||||
import { Body, Controller, Delete, Get, HttpCode, Param, Post, Put } from '@nestjs/common';
|
||||
import { AdminDocumentsService } from './admin-documents.service';
|
||||
import { TableQueryDto } from '../admin-table/table-query.dto';
|
||||
import { CurrentAdmin, RequirePermission } from '../auth/guards';
|
||||
import { CurrentAdmin, RequirePermission, SuperAdminOnly } from '../auth/guards';
|
||||
import type { AuthenticatedAdmin } from '../auth/jwt.strategy';
|
||||
|
||||
/**
|
||||
@@ -46,6 +46,7 @@ export class AdminDocumentsController {
|
||||
|
||||
// ── wallet settings (views/manage/wallet.vue) ────────────────────
|
||||
@Get('wallet/config')
|
||||
@SuperAdminOnly()
|
||||
@RequirePermission('config.wallet')
|
||||
getWalletConfig() {
|
||||
return this.documents.getSetting('wallet.config');
|
||||
@@ -53,12 +54,14 @@ export class AdminDocumentsController {
|
||||
|
||||
@Post('wallet/config')
|
||||
@HttpCode(200)
|
||||
@SuperAdminOnly()
|
||||
@RequirePermission('config.wallet')
|
||||
setWalletConfig(@Body() body: Record<string, unknown>) {
|
||||
return this.documents.setSetting('wallet.config', body);
|
||||
}
|
||||
|
||||
@Get('wallet/birthday/config')
|
||||
@SuperAdminOnly()
|
||||
@RequirePermission('config.wallet')
|
||||
getBirthdayConfig() {
|
||||
return this.documents.getSetting('wallet.birthday');
|
||||
@@ -66,6 +69,7 @@ export class AdminDocumentsController {
|
||||
|
||||
@Post('wallet/birthday/config')
|
||||
@HttpCode(200)
|
||||
@SuperAdminOnly()
|
||||
@RequirePermission('config.wallet')
|
||||
setBirthdayConfig(@Body() body: Record<string, unknown>) {
|
||||
return this.documents.setSetting('wallet.birthday', body);
|
||||
|
||||
Reference in New Issue
Block a user