mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-09 20:12:10 +10:00
feat: user page & $dropFetch util
This commit is contained in:
@ -2,14 +2,6 @@ import { applicationSettings } from "../internal/config/application-configuratio
|
||||
import prisma from "../internal/db/database";
|
||||
|
||||
export default defineNitroPlugin(async (nitro) => {
|
||||
const applicationSettingsCount = await prisma.applicationSettings.count({});
|
||||
if (applicationSettingsCount > 0) {
|
||||
await applicationSettings.pullConfiguration();
|
||||
} else {
|
||||
await applicationSettings.initialiseConfiguration();
|
||||
}
|
||||
console.log("initalised application config");
|
||||
|
||||
// Ensure system user exists
|
||||
// The system user owns any user-based code
|
||||
// that we want to re-use for the app
|
||||
|
||||
@ -27,7 +27,9 @@ export default defineNitroPlugin(async (nitro) => {
|
||||
}
|
||||
|
||||
// Add providers based on their position in the application settings
|
||||
const configuredProviderList = applicationSettings.get("metadataProviders");
|
||||
const configuredProviderList = await applicationSettings.get(
|
||||
"metadataProviders"
|
||||
);
|
||||
const max = configuredProviderList.length;
|
||||
for (const [index, providerId] of configuredProviderList.entries()) {
|
||||
const priority = max * 2 - index; // Offset by the length --- (max - index) + max
|
||||
|
||||
Reference in New Issue
Block a user