Skip to content

Commit

Permalink
fix: parse float
Browse files Browse the repository at this point in the history
  • Loading branch information
Fllorent0D committed Oct 10, 2023
1 parent ab946c7 commit 09a83b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/common/data-aftt/services/member-processing.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class DataAFTTMemberProcessingService {
memberId: parseInt(cols[0], 10),
memberLicence: parseInt(cols[1], 10),
date: new Date(),
points: parseInt(cols[10], 10),
points: parseFloat(cols[10]),
ranking: cols[11].length ? parseInt(cols[11]) : null,
rankingWI: cols[12].length ? parseInt(cols[12]) : null,
rankingLetterEstimation: null,
Expand Down
10 changes: 5 additions & 5 deletions src/common/data-aftt/services/results-processing.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ export class DataAFTTResultsProcessingService {
date: new Date(cols[1]),
memberLicence: parseInt(cols[2], 10),
memberRanking: cols[10],
memberPoints: parseInt(cols[13], 10),
memberPoints: parseFloat(cols[13]),
opponentRanking: cols[8],
opponentLicence: parseInt(cols[3], 10),
opponentPoints: parseInt(cols[14], 10),
opponentPoints: parseFloat(cols[14]),
result: cols[4] === 'V' ? Result.VICTORY : Result.DEFEAT,
score: cols[5],
competitionType: cols[9] === 'T' ? CompetitionType.TOURNAMENT : CompetitionType.CHAMPIONSHIP,
competitionCoef: parseFloat(cols[11]),
competitionName: cols[12],
diffPoints: parseInt(cols[15], 10),
pointsToAdd: parseInt(cols[16], 10),
diffPoints: parseFloat(cols[15]),
pointsToAdd: parseFloat(cols[16]),
looseFactor: parseFloat(cols[17]),
definitivePointsToAdd: parseInt(cols[18], 10),
definitivePointsToAdd: parseFloat(cols[18]),
}, gender);
} catch (e) {
this.logger.error(e.message);
Expand Down

0 comments on commit 09a83b1

Please sign in to comment.