mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 12:43:12 +03:00
фикс отправки данных
This commit is contained in:
parent
e2080a6824
commit
aaa234ba67
1 changed files with 3 additions and 3 deletions
6
main.js
6
main.js
|
@ -16,14 +16,14 @@ schedule.scheduleJob('30 8 * * *', async function () {
|
||||||
|
|
||||||
fastify.get('/api/getRate/', async function (req, reply) {
|
fastify.get('/api/getRate/', async function (req, reply) {
|
||||||
if (!req['query']?.['fromCurrency'] || !req['query']?.['convCurrency']) return response(
|
if (!req['query']?.['fromCurrency'] || !req['query']?.['convCurrency']) return response(
|
||||||
400,
|
|
||||||
'error',
|
'error',
|
||||||
|
400,
|
||||||
'fromCurrency and convCurrency parameter is required'
|
'fromCurrency and convCurrency parameter is required'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!req['query']?.['periodStart']) return response(
|
if (!req['query']?.['periodStart']) return response(
|
||||||
400,
|
|
||||||
'error',
|
'error',
|
||||||
|
400,
|
||||||
'periodStart parameter is required'
|
'periodStart parameter is required'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ fastify.get('/api/getRate/', async function (req, reply) {
|
||||||
|
|
||||||
fastify.listen({
|
fastify.listen({
|
||||||
host: config['server']['host'],
|
host: config['server']['host'],
|
||||||
port: config['server']['port']
|
port: config['server']['port'],
|
||||||
}, err => {
|
}, err => {
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
console.log(`server listening on ${fastify.server.address().port}`)
|
console.log(`server listening on ${fastify.server.address().port}`)
|
||||||
|
|
Loading…
Add table
Reference in a new issue