Skip to content

Commit

Permalink
renamed env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
yvasyliev committed Nov 8, 2023
1 parent 7258e30 commit f791b51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/main/java/com/github/yvasyliev/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ public Module module(JsonDeserializer<Post> postJsonDeserializer) {
return module;
}

@Bean
public String userAgent(@Value("${REDDIT_USERNAME}") String redditUsername) {
return "java:reddit-telegram-repeater:2.0.0 (by /u/%s)".formatted(redditUsername);
}

@Bean
public HttpClient httpClient() {
return HttpClient.newHttpClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

@Service
public class SubredditNewSupplier implements ThrowingSupplier<JsonNode> {
@Value("${SUBREDDIT}")
@Value("${reddit.subreddit}")
private String subreddit;

@Autowired
@Value("java:${project.artifactId}:${project.version} (by /u/${reddit.username})")
private String userAgent;

@Autowired
Expand Down

0 comments on commit f791b51

Please sign in to comment.