feat: migration api keys to use kysely (#15206)

This commit is contained in:
Jason Rasmussen 2025-01-10 14:02:12 -05:00 committed by GitHub
parent 3030e74fc3
commit 930f979960
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 151 additions and 107 deletions

View file

@ -308,7 +308,7 @@ export class AuthService extends BaseService {
private async validateApiKey(key: string): Promise<AuthDto> {
const hashedKey = this.cryptoRepository.hashSha256(key);
const apiKey = await this.keyRepository.getKey(hashedKey);
if (apiKey?.user) {
if (apiKey) {
return { user: apiKey.user, apiKey };
}