Skip to content

Commit

Permalink
fix di for settingsservice
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaktushose committed Aug 9, 2024
1 parent 8e23f67 commit d3d9aa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/github/kaktushose/nplaybot/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Database(Bot bot) {
initialSetup(bot.getGuild().getIdLong());

settingsService = new SettingsService(dataSource, bot);
itemService = new ItemService(dataSource, bot);
itemService = new ItemService(dataSource, bot, settingsService);
rankService = new RankService(dataSource, itemService, bot);
contestEventService = new ContestEventService(dataSource, bot);
collectEventService = new CollectEventService(dataSource, bot);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public class ItemService {
private final EmbedCache embedCache;
private final SettingsService settingsService;

public ItemService(DataSource dataSource, Bot bot) {
public ItemService(DataSource dataSource, Bot bot, SettingsService settingsService) {
this.dataSource = dataSource;
this.guild = bot.getGuild();
this.embedCache = bot.getEmbedCache();
this.settingsService = bot.getDatabase().getSettingsService();
this.settingsService = settingsService;
}

public List<Item> getAllItems() {
Expand Down

0 comments on commit d3d9aa5

Please sign in to comment.