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