Skip to content

Commit 78b00b8

Browse files
committed
Fix variable and environment variable names
1 parent ab65102 commit 78b00b8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ RUN apt-get update && apt-get install -y \
3131
COPY --from=build /anifunnel/target/release/anifunnel .
3232

3333
ENV ANILIST_TOKEN= \
34-
BIND_ADDRESS=0.0.0.0 \
35-
PORT=8000
34+
ANIFUNNEL_ADDRESS=0.0.0.0 \
35+
ANIFUNNEL_PORT=8000
3636

3737
EXPOSE 8000
3838

src/main.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ use simple_logger::SimpleLogger;
1111
use std::net::Ipv4Addr;
1212

1313
#[derive(Parser, Debug)]
14-
struct PlexAnihookArgs {
14+
struct AnifunnelArgs {
1515
/// Anilist API token.
1616
#[clap(env = "ANILIST_TOKEN")]
1717
anilist_token: String,
1818

1919
/// IP address to bind the server to.
20-
#[clap(long, default_value_t = Ipv4Addr::new(0, 0, 0, 0), env = "ANIHOOK_ADDRESS")]
20+
#[clap(long, default_value_t = Ipv4Addr::new(0, 0, 0, 0), env = "ANIFUNNEL_ADDRESS")]
2121
bind_address: Ipv4Addr,
2222

2323
/// Port to bind the server to.
24-
#[clap(long, default_value_t = 8000, env = "ANIHOOK_PORT")]
24+
#[clap(long, default_value_t = 8000, env = "ANIFUNNEL_PORT")]
2525
port: u16,
2626
}
2727

28-
struct PlexAnihookState {
28+
struct AnifunnelState {
2929
token: String,
3030
user: anilist::User,
3131
}
@@ -38,7 +38,7 @@ struct ScrobbleForm<'r> {
3838
#[post("/", data = "<form>")]
3939
async fn scrobble(
4040
form: Form<ScrobbleForm<'_>>,
41-
state: &rocket::State<PlexAnihookState>,
41+
state: &rocket::State<AnifunnelState>,
4242
) -> &'static str {
4343
let webhook: plex::Webhook = match serde_json::from_str(form.payload) {
4444
Ok(data) => data,
@@ -79,7 +79,7 @@ async fn scrobble(
7979

8080
#[rocket::main]
8181
async fn main() {
82-
let args = PlexAnihookArgs::parse();
82+
let args = AnifunnelArgs::parse();
8383

8484
SimpleLogger::new()
8585
.with_level(LevelFilter::Info)
@@ -95,7 +95,7 @@ async fn main() {
9595
}
9696
};
9797

98-
let state = PlexAnihookState {
98+
let state = AnifunnelState {
9999
token: args.anilist_token,
100100
user: user,
101101
};

0 commit comments

Comments
 (0)