feat(sms): display live MeliPayamak account balance/credit in SMS settings
Deploy Canina / deploy (push) Successful in 44s
Deploy Canina / deploy (push) Successful in 44s
This commit is contained in:
1 parent
16c1ecdff2
commit
f430c4931f
15 files changed
+48263
-48083
No files matched your search
@@ -184,6 +184,15 @@ export class SettingsController {
|
||||
return this.settingsService.getSmsSettings();
|
||||
}
|
||||
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin')
|
||||
@ApiBearerAuth()
|
||||
@Get('sms/credit')
|
||||
@ApiOperation({ summary: 'استعلام موجودی و شارژ باقیمانده حساب ملی پیامک' })
|
||||
getSmsCredit() {
|
||||
return this.settingsService.getSmsCredit();
|
||||
}
|
||||
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin')
|
||||
@ApiBearerAuth()
|
||||
|
||||
@@ -367,6 +367,10 @@ export class SettingsService implements OnModuleInit {
|
||||
return this.smsService.getSmsConfig();
|
||||
}
|
||||
|
||||
async getSmsCredit() {
|
||||
return this.smsService.getCredit();
|
||||
}
|
||||
|
||||
async updateSmsSettings(value: Prisma.InputJsonValue) {
|
||||
const key = 'sms_config';
|
||||
return this.prisma.setting.upsert({
|
||||
|
||||
Reference in new issue
Block a user