gelbooru should work, remove caching, fix random

This commit is contained in:
creations 2025-04-03 16:05:41 -04:00
parent e6acb47796
commit c34ddea659
Signed by: creations
GPG key ID: 8F553AA4320FC711
14 changed files with 480 additions and 401 deletions

View file

@ -8,12 +8,6 @@ export const environment: Environment = {
process.argv.includes("--dev"),
};
export const redisConfig: RedisConfig = {
host: process.env.REDIS_HOST || "dragonfly-redis",
port: parseInt(process.env.REDIS_PORT || "6379", 10),
password: process.env.REDIS_PASSWORD || undefined,
};
if (
!process.env.E621_USER_AGENT ||
!process.env.E621_USERNAME ||
@ -40,3 +34,14 @@ export function getE621Auth(): Record<string, string> {
"Basic " + btoa(`${e621Username || ""}:${e621ApiKey || ""}`),
};
}
if (!process.env.GELBOORU_API_KEY || !process.env.GELBOORU_USER_ID) {
logger.error("Missing Gelbooru credentials in .env file");
}
export function gelBooruAUTH(): Record<string, string> {
return {
apiKey: process.env.GELBOORU_API_KEY || "",
userId: process.env.GELBOORU_USER_ID || "",
};
}