18 lines
520 B
JavaScript
18 lines
520 B
JavaScript
import { checkUser } from "../../http/auth.js";
|
|
import { getConfig } from "../../common/config.js";
|
|
|
|
const key = 'single';
|
|
|
|
export function getModuleConfig() {
|
|
const config = getConfig();
|
|
return {
|
|
core: process.env.SINGLE_API_KEY_CORE,
|
|
archive: process.env.SINGLE_API_KEY_ARCHIVE,
|
|
}
|
|
}
|
|
|
|
export async function initModule(app, passport) {
|
|
if (process.env.SINGLE_API_KEY_CORE && process.env.SINGLE_API_KEY_ARCHIVE) {
|
|
await checkUser(key, 'https://single', 'single', 'single');
|
|
}
|
|
} |