Retrieve forum id for checksum provider dynamically
This commit is contained in:
@@ -2,6 +2,7 @@ package de.jeyp91;
|
|||||||
import de.jeyp91.apifootball.APIFootballUpdater;
|
import de.jeyp91.apifootball.APIFootballUpdater;
|
||||||
import de.jeyp91.tippligaforum.MatchesListForumUpdater;
|
import de.jeyp91.tippligaforum.MatchesListForumUpdater;
|
||||||
import de.jeyp91.tippliga.*;
|
import de.jeyp91.tippliga.*;
|
||||||
|
import de.jeyp91.tippligaforum.TippligaConfigProvider;
|
||||||
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
import de.jeyp91.tippligaforum.TippligaSQLConnector;
|
||||||
import net.sourceforge.argparse4j.ArgumentParsers;
|
import net.sourceforge.argparse4j.ArgumentParsers;
|
||||||
import net.sourceforge.argparse4j.inf.ArgumentParser;
|
import net.sourceforge.argparse4j.inf.ArgumentParser;
|
||||||
@@ -70,20 +71,9 @@ public class App {
|
|||||||
matchesListForumUpdater.updateAllLeagues(season);
|
matchesListForumUpdater.updateAllLeagues(season);
|
||||||
break;
|
break;
|
||||||
case "PostChecksum":
|
case "PostChecksum":
|
||||||
TippligaSQLConnector con = TippligaSQLConnector.getInstance();
|
TippligaConfigProvider configProvider = new TippligaConfigProvider(season);
|
||||||
int forumId;
|
String checksum = configProvider.getChecksumOfConfigPost(configFile);
|
||||||
if (season == 2021) {
|
System.out.println(checksum);
|
||||||
forumId = 15;
|
|
||||||
String checksum = con.getChecksumOfPost(forumId, configFile);
|
|
||||||
System.out.println(checksum);
|
|
||||||
} else if (season == 2022) {
|
|
||||||
forumId = 17;
|
|
||||||
String checksum = con.getChecksumOfPost(forumId, configFile);
|
|
||||||
System.out.println(checksum);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logger.error("Season does not exist");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -29,4 +29,8 @@ public class TippligaConfigProvider {
|
|||||||
}
|
}
|
||||||
return tippligaConfig;
|
return tippligaConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getChecksumOfConfigPost(String configFile) {
|
||||||
|
return con.getChecksumOfPost(this.seasonForumId, configFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user