postio / libraries /nestjs-libraries /src /services /codes.service.ts
Leon4gr45's picture
Upload folder using huggingface_hub (part 10)
a271c58 verified
Raw
History Blame Contribute Delete
487 Bytes
import { Injectable } from '@nestjs/common';
import { AuthService } from '@gitroom/helpers/auth/auth.service';
@Injectable()
export class CodesService {
generateCodes(providerToken: string) {
try {
const decrypt = AuthService.fixedDecryption(providerToken);
return [...new Array(10000)]
.map((_, index) => {
return AuthService.fixedEncryption(`${decrypt}:${index}`);
})
.join('\n');
} catch (error) {
return '';
}
}
}