mirror of
https://github.com/immich-app/immich.git
synced 2026-05-26 17:42:32 -04: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:
@@ -24,7 +24,7 @@ describe(ApiKeyService.name, () => {
|
||||
await sut.create(auth, { name: apiKey.name, permissions: apiKey.permissions });
|
||||
|
||||
expect(mocks.apiKey.create).toHaveBeenCalledWith({
|
||||
key: 'super-secret (hashed)',
|
||||
key: Buffer.from('super-secret (hashed)'),
|
||||
name: apiKey.name,
|
||||
permissions: apiKey.permissions,
|
||||
userId: apiKey.userId,
|
||||
@@ -44,7 +44,7 @@ describe(ApiKeyService.name, () => {
|
||||
await sut.create(auth, { permissions: [Permission.All] });
|
||||
|
||||
expect(mocks.apiKey.create).toHaveBeenCalledWith({
|
||||
key: 'super-secret (hashed)',
|
||||
key: Buffer.from('super-secret (hashed)'),
|
||||
name: 'API Key',
|
||||
permissions: [Permission.All],
|
||||
userId: auth.user.id,
|
||||
|
||||
Reference in New Issue
Block a user