mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-26 01:34:38 +10:00
fix: eslint error and server plugin name
This commit is contained in:
@@ -9,7 +9,7 @@ export const enabledAuthManagers: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const initFunctions: {
|
const initFunctions: {
|
||||||
[K in keyof typeof enabledAuthManagers]: () => Promise<any>;
|
[K in keyof typeof enabledAuthManagers]: () => Promise<unknown>;
|
||||||
} = {
|
} = {
|
||||||
oidc: OIDCManager.prototype.create,
|
oidc: OIDCManager.prototype.create,
|
||||||
simple: async () => {
|
simple: async () => {
|
||||||
@@ -18,11 +18,12 @@ const initFunctions: {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defineNitroPlugin(async (nitro) => {
|
export default defineNitroPlugin(async (_nitro) => {
|
||||||
for (const [key, init] of Object.entries(initFunctions)) {
|
for (const [key, init] of Object.entries(initFunctions)) {
|
||||||
try {
|
try {
|
||||||
const object = await init();
|
const object = await init();
|
||||||
if (!object) break;
|
if (!object) break;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(enabledAuthManagers as any)[key] = object;
|
(enabledAuthManagers as any)[key] = object;
|
||||||
console.log(`enabled auth: ${key}`);
|
console.log(`enabled auth: ${key}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user