SteamWar/SpigotCore
Archiviert
13
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 @Override
public void getReplay(int fightID, Consumer<InputStream> reader) { public void getReplay(int fightID, Consumer<InputStream> reader) {
getReplay.select(rs -> { getReplay.select(rs -> {
@ -158,10 +158,10 @@ public class SQLProvider implements Provider {
}, fightID); }, 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 @Override
public void setReplay(int fightID, InputStream data) { 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 (?, ?, ?, ?, ?, ?)"); private static final Statement create = new Statement("INSERT INTO FightPlayer (FightID, UserID, Team, Kit, Kills, IsOut) VALUES (?, ?, ?, ?, ?, ?)");