You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

19 lines
507 B

import { samehSmsAuth } from '../services/samehAuthentication.js'
import SmsService from '../services/smsService.js'
import cron from 'node-cron'
const services = new SmsService()
export default function (fastify: any, opts: any, done: any) {
cron.schedule(`*/2 * * * *`, async () => {
await services.smsSender(fastify.req, fastify.reply)
});
fastify.get('/auth', samehSmsAuth);
fastify.get('/smsList', services.smsListAccess);
fastify.get('/sendSms', services.smsSender);
done();
};