Skip to content

Commit a0a7dd4

Browse files
committed
fix(cups): save TeamIndex for auto uploaded recs
1 parent 3bdd66e commit a0a7dd4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/api/cups.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ const generate = async (event, cup) => {
273273
const getTimes = await Time.findAll({
274274
where: { LevelIndex: event.LevelIndex },
275275
order: [['TimeIndex', 'ASC']],
276-
include: [{ model: TimeFile, as: 'TimeFileData' }],
276+
include: [
277+
{ model: TimeFile, as: 'TimeFileData' },
278+
{ model: Kuski, as: 'KuskiData', attributes: ['KuskiIndex', 'TeamIndex'] }
279+
],
277280
});
278281
const getCupTimes = await SiteCupTime.findAll({
279282
where: { CupIndex: event.CupIndex },

src/utils/cups.js

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export const generateEvent = (event, cup, times, cuptimes) => {
100100
if (t.TimeFileData) {
101101
data.UUID = t.TimeFileData.UUID;
102102
data.MD5 = t.TimeFileData.MD5;
103+
data.TeamIndex = t.KuskiData.TeamIndex;
103104
}
104105
// update cup times if replay is uploaded
105106
if (exists.length > 0) {

0 commit comments

Comments
 (0)