mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 04:33:11 +03:00
Сделал в некоторых местах JSDocs
This commit is contained in:
parent
d36f9a67f3
commit
74947f0409
4 changed files with 40 additions and 6 deletions
|
@ -2,6 +2,11 @@ const config = require('../config/main.js')();
|
|||
const axios = require('axios');
|
||||
const pool = require('../database/postgresql.js');
|
||||
|
||||
|
||||
/**
|
||||
* Saves exchange rate of the cryptocurrency
|
||||
* @return {Object}
|
||||
*/
|
||||
function save_fiat() {
|
||||
if (!config['currency']['collecting']['crypto']) return;
|
||||
const depth = config['currency']['coinapiKeys']
|
||||
|
@ -47,6 +52,13 @@ function save_fiat() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changing API keys
|
||||
* @param {Array} list - List of all keys
|
||||
* @param active - Active API key
|
||||
* @returns {number} - Outputs the number of the key that should work
|
||||
*/
|
||||
|
||||
function rotate_key(list, active) {
|
||||
return active[0] = (active + 1) % list.length;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@ const pool = require('../database/postgresql.js');
|
|||
const axios = require('axios');
|
||||
const config = require('../config/main.js')();
|
||||
|
||||
/**
|
||||
* Saves exchange rate of the fiat currency
|
||||
* @returns {Object} -
|
||||
*/
|
||||
async function save_fiat() {
|
||||
if (!config['currency']['collecting']['fiat']) return;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue