16 lines
369 B
TypeScript
16 lines
369 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { loadAppConfig } from '@dukang/shared-types';
|
|
|
|
@Controller('common')
|
|
export class ClientConfigController {
|
|
@Get('client-config')
|
|
clientConfig() {
|
|
const cfg = loadAppConfig();
|
|
return {
|
|
mockPay: cfg.mockPay,
|
|
wechatPayEnabled: cfg.wechatPayEnabled,
|
|
mockSms: cfg.mockSms,
|
|
};
|
|
}
|
|
}
|