add Config Wrapper for .env
This commit is contained in:
parent
942719d19c
commit
373a6b4279
20
app/src/main/java/net/tomatentum/tomatenmusic3/Config.java
Normal file
20
app/src/main/java/net/tomatentum/tomatenmusic3/Config.java
Normal file
@ -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");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user