Save beatmap file to database if gotten from API

This commit is contained in:
nise.moe 2024-03-02 18:43:55 +01:00
parent 5794b5a2fb
commit a53368de61

View File

@ -629,6 +629,11 @@ class ImportScores(
if(beatmapFile == null) { if(beatmapFile == null) {
this.logger.error("Failed to fetch beatmap file for beatmap_id = $beatmapId from osu!api") this.logger.error("Failed to fetch beatmap file for beatmap_id = $beatmapId from osu!api")
return return
} else {
dslContext.update(BEATMAPS)
.set(BEATMAPS.BEATMAP_FILE, beatmapFile)
.where(BEATMAPS.BEATMAP_ID.eq(beatmapId))
.execute()
} }
} }