mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: migration api keys to use kysely (#15206)
This commit is contained in:
parent
3030e74fc3
commit
930f979960
9 changed files with 151 additions and 107 deletions
|
|
@ -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 };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue