mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 20:51:25 +03:00
убрал мусор
This commit is contained in:
parent
aaa234ba67
commit
05556b485a
1 changed files with 1 additions and 2 deletions
3
main.js
3
main.js
|
@ -8,13 +8,12 @@ const config = yaml.parse(fs.readFileSync("./config.yaml", "utf-8"));
|
||||||
const saveRate = require('./utils/saveRate.js');
|
const saveRate = require('./utils/saveRate.js');
|
||||||
const response = require('./utils/errorResponse');
|
const response = require('./utils/errorResponse');
|
||||||
|
|
||||||
saveRate()
|
|
||||||
schedule.scheduleJob('30 8 * * *', async function () {
|
schedule.scheduleJob('30 8 * * *', async function () {
|
||||||
console.log('I save the currency data');
|
console.log('I save the currency data');
|
||||||
await saveRate();
|
await saveRate();
|
||||||
});
|
});
|
||||||
|
|
||||||
fastify.get('/api/getRate/', async function (req, reply) {
|
fastify.get('/api/getRate/', async function (req) {
|
||||||
if (!req['query']?.['fromCurrency'] || !req['query']?.['convCurrency']) return response(
|
if (!req['query']?.['fromCurrency'] || !req['query']?.['convCurrency']) return response(
|
||||||
'error',
|
'error',
|
||||||
400,
|
400,
|
||||||
|
|
Loading…
Add table
Reference in a new issue