From 373a6b4279f7c1ba6f00420fc333db10e239b124 Mon Sep 17 00:00:00 2001 From: tueem Date: Thu, 10 Oct 2024 21:18:29 +0200 Subject: [PATCH] add Config Wrapper for .env --- .../net/tomatentum/tomatenmusic3/Config.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 app/src/main/java/net/tomatentum/tomatenmusic3/Config.java diff --git a/app/src/main/java/net/tomatentum/tomatenmusic3/Config.java b/app/src/main/java/net/tomatentum/tomatenmusic3/Config.java new file mode 100644 index 0000000..c4f9178 --- /dev/null +++ b/app/src/main/java/net/tomatentum/tomatenmusic3/Config.java @@ -0,0 +1,20 @@ +package net.tomatentum.tomatenmusic3; + +import io.github.cdimascio.dotenv.Dotenv; + +public class Config { + + private Dotenv env; + + public Config(Dotenv env) { + this.env = env; + } + + public String token() { + return env.get("TOKEN"); + } + + public boolean isDevelopment() { + return env.get("ENVIRONMENT").equals("Development"); + } +}