latest server code
Some checks failed
Build and Push Multi-Arch Docker Image / build-and-push (push) Failing after 38s

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2025-11-28 21:02:02 +01:00
parent 8f51ac8b24
commit 4defe266eb
10 changed files with 121 additions and 58 deletions

View File

@@ -0,0 +1,18 @@
import 'dart:io';
import 'package:injectable/injectable.dart';
import 'package:cinema/common/env_not_found_exception.dart';
const apiKey = "apiKey";
@module
abstract class EnvModule {
@lazySingleton
@Named(apiKey)
String get api_key {
final key = Platform.environment['TMDB_API_KEY'];
if (key == null || key.isEmpty) {
throw EnvNotFoundException('TMDB_API_KEY environment variable is missing.');
}
return key;
}
}