Updated
This commit is contained in:
parent
bcb83dfea5
commit
4430d24a3e
14 changed files with 99 additions and 106 deletions
|
|
@ -1,10 +1,8 @@
|
|||
/** biome-ignore-all lint/suspicious/noExplicitAny: <_> */
|
||||
|
||||
import dayjs from "dayjs";
|
||||
import * as fs from "node:fs";
|
||||
import { ofetch } from "ofetch";
|
||||
import * as toml from "toml";
|
||||
import { encryptRsa } from "../../scripts/index.ts";
|
||||
import { encryptRsa } from "../../scripts/index";
|
||||
|
||||
const apiConfig = toml.parse(
|
||||
fs.readFileSync("configs/config.api.toml", "utf-8"),
|
||||
|
|
@ -13,11 +11,11 @@ const securityConfig = toml.parse(
|
|||
fs.readFileSync("configs/config.security.toml", "utf-8"),
|
||||
);
|
||||
|
||||
const TOKEN_NAME = securityConfig.token.token_name;
|
||||
const TOKEN_EXPIRATION = securityConfig.token.token_expiration;
|
||||
const URL = apiConfig.backend.backend_url;
|
||||
const RETRY = apiConfig.request.request_retries;
|
||||
const CODES = apiConfig.request.request_retry_codes;
|
||||
const TOKEN_NAME = securityConfig.token.name;
|
||||
const TOKEN_EXPIRATION = securityConfig.token.expiration;
|
||||
const URL = apiConfig.backend.url;
|
||||
const RETRY = apiConfig.request.retries;
|
||||
const CODES = apiConfig.request.retry_codes;
|
||||
|
||||
export default async (api: string, body: { [key: string]: unknown }) => {
|
||||
const today = new Date();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue