feat: send account and invoice SMS from stored template IDs
Move sms.ir template IDs out of env into settings so SuperAdmin can manage them, and record every outbound SMS status in notifications.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
const catchAsync = require('../../utils/catchAsync');
|
||||
const settingService = require('./settingService');
|
||||
const { successResponse } = require('../../utils/apiResponse');
|
||||
|
||||
exports.getSettings = catchAsync(async (req, res) => {
|
||||
const settings = await settingService.getSettings();
|
||||
return successResponse(res, 200, 'Settings retrieved', settings);
|
||||
});
|
||||
|
||||
exports.saveSettings = catchAsync(async (req, res) => {
|
||||
const settings = await settingService.saveSettings(req.body);
|
||||
return successResponse(res, 200, 'Settings saved', settings);
|
||||
});
|
||||
Reference in New Issue
Block a user