Switched from card prefix replacement via modulo to regex
This commit is contained in:
		@@ -57,7 +57,7 @@ export class CreateTrackScan {
 | 
				
			|||||||
     * @returns The runnerCard whom's id you provided.
 | 
					     * @returns The runnerCard whom's id you provided.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public async getCard(): Promise<RunnerCard> {
 | 
					    public async getCard(): Promise<RunnerCard> {
 | 
				
			||||||
        const id = this.card % 200000000000;
 | 
					        const id = parseInt(this.card.toString().replace(/^2(0)*/, ""));
 | 
				
			||||||
        const track = await getConnection().getRepository(RunnerCard).findOne({ id: id }, { relations: ["runner"] });
 | 
					        const track = await getConnection().getRepository(RunnerCard).findOne({ id: id }, { relations: ["runner"] });
 | 
				
			||||||
        if (!track) {
 | 
					        if (!track) {
 | 
				
			||||||
            throw new RunnerCardNotFoundError();
 | 
					            throw new RunnerCardNotFoundError();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user