mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: prefer buffer (#26469)
* refactor: prefer buffer * Update server/src/schema/tables/session.table.ts Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> --------- Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ export class ApiKeyRepository {
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [DummyValue.STRING] })
|
||||
getKey(hashedToken: string) {
|
||||
getKey(hashedToken: Buffer) {
|
||||
return this.db
|
||||
.selectFrom('api_key')
|
||||
.select((eb) => [
|
||||
|
||||
@@ -23,7 +23,7 @@ export class CryptoRepository {
|
||||
}
|
||||
|
||||
hashSha256(value: string) {
|
||||
return createHash('sha256').update(value).digest('base64');
|
||||
return createHash('sha256').update(value).digest();
|
||||
}
|
||||
|
||||
verifySha256(value: string, encryptedValue: string, publicKey: string) {
|
||||
|
||||
@@ -48,7 +48,7 @@ export class SessionRepository {
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [DummyValue.STRING] })
|
||||
getByToken(token: string) {
|
||||
getByToken(token: Buffer) {
|
||||
return this.db
|
||||
.selectFrom('session')
|
||||
.select((eb) => [
|
||||
|
||||
Reference in New Issue
Block a user