mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 17:25:35 +03:00
refactor: remove session entity (#17466)
* refactor: remove session entity * fix: test * update sql * remote export
This commit is contained in:
6
server/test/fixtures/auth.stub.ts
vendored
6
server/test/fixtures/auth.stub.ts
vendored
@@ -1,6 +1,6 @@
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { SessionEntity } from 'src/entities/session.entity';
|
||||
import { SharedLinkEntity } from 'src/entities/shared-link.entity';
|
||||
import { SessionItem } from 'src/types';
|
||||
|
||||
const authUser = {
|
||||
admin: {
|
||||
@@ -27,7 +27,7 @@ export const authStub = {
|
||||
user: authUser.user1,
|
||||
session: {
|
||||
id: 'token-id',
|
||||
} as SessionEntity,
|
||||
} as SessionItem,
|
||||
}),
|
||||
user2: Object.freeze<AuthDto>({
|
||||
user: {
|
||||
@@ -40,7 +40,7 @@ export const authStub = {
|
||||
},
|
||||
session: {
|
||||
id: 'token-id',
|
||||
} as SessionEntity,
|
||||
} as SessionItem,
|
||||
}),
|
||||
adminSharedLink: Object.freeze<AuthDto>({
|
||||
user: authUser.admin,
|
||||
|
||||
6
server/test/fixtures/session.stub.ts
vendored
6
server/test/fixtures/session.stub.ts
vendored
@@ -1,8 +1,8 @@
|
||||
import { SessionEntity } from 'src/entities/session.entity';
|
||||
import { SessionItem } from 'src/types';
|
||||
import { userStub } from 'test/fixtures/user.stub';
|
||||
|
||||
export const sessionStub = {
|
||||
valid: Object.freeze<SessionEntity>({
|
||||
valid: Object.freeze<SessionItem>({
|
||||
id: 'token-id',
|
||||
token: 'auth_token',
|
||||
userId: userStub.user1.id,
|
||||
@@ -13,7 +13,7 @@ export const sessionStub = {
|
||||
deviceOS: '',
|
||||
updateId: 'uuid-v7',
|
||||
}),
|
||||
inactive: Object.freeze<SessionEntity>({
|
||||
inactive: Object.freeze<SessionItem>({
|
||||
id: 'not_active',
|
||||
token: 'auth_token',
|
||||
userId: userStub.user1.id,
|
||||
|
||||
Reference in New Issue
Block a user