12
0

Merge pull request 'Update replay stuff' (#188) from Replay into master
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Reviewed-on: #188
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2022-04-11 08:04:53 +02:00
Commit ba83a2d792

Datei anzeigen

@ -148,7 +148,7 @@ public class SQLProvider implements Provider {
});
}
private static final Statement getReplay = new Statement("SELECT Replay FROM Fight WHERE FightID = ?");
private static final Statement getReplay = new Statement("SELECT Replay FROM Replay WHERE FightID = ?");
@Override
public void getReplay(int fightID, Consumer<InputStream> reader) {
getReplay.select(rs -> {
@ -158,10 +158,10 @@ public class SQLProvider implements Provider {
}, fightID);
}
private static final Statement setReplay = new Statement("UPDATE Fight SET Replay = ? WHERE FightID = ?");
private static final Statement setReplay = new Statement("INSERT INTO Replay (FightID, Replay) SET FightID = ?, Replay = ?");
@Override
public void setReplay(int fightID, InputStream data) {
setReplay.update(data, fightID);
setReplay.update(fightID, data);
}
private static final Statement create = new Statement("INSERT INTO FightPlayer (FightID, UserID, Team, Kit, Kills, IsOut) VALUES (?, ?, ?, ?, ?, ?)");