Improve cacheability
All checks were successful
Build and Publish Docker Image / build_and_push (push) Successful in 42s

This commit is contained in:
2024-09-16 14:29:51 +00:00
parent 3a9fc1897a
commit 83ce2f6f57
3 changed files with 32 additions and 14 deletions

View File

@@ -10,7 +10,7 @@ interface Config {
omdbApiKey: string;
replicateApiKey: string;
mongodbUri: string;
registerSlashCommands?: boolean;
registerSlashCommands: boolean;
}
const getEnv = (key: string, required = true): string | boolean | undefined => {
@@ -29,7 +29,8 @@ const config: Config = {
omdbApiKey: getEnv('OMDB_API_KEY') as string,
replicateApiKey: getEnv('REPLICATE_API_KEY') as string,
mongodbUri: getEnv('MONGODB_URI') as string,
registerSlashCommands: getEnv('REGISTER_SLASH_COMMANDS', false) as boolean,
registerSlashCommands:
(getEnv('REGISTER_SLASH_COMMANDS', false) as boolean) || false, // Default to false
};
export default config;