refactor: more database types (#17490)
This commit is contained in:
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { Session } from 'src/database';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
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 SessionItem,
|
||||
} as Session,
|
||||
}),
|
||||
user2: Object.freeze<AuthDto>({
|
||||
user: {
|
||||
@@ -40,7 +40,7 @@ export const authStub = {
|
||||
},
|
||||
session: {
|
||||
id: 'token-id',
|
||||
} as SessionItem,
|
||||
} as Session,
|
||||
}),
|
||||
adminSharedLink: Object.freeze<AuthDto>({
|
||||
user: authUser.admin,
|
||||
|
||||
Vendored
-27
@@ -1,27 +0,0 @@
|
||||
import { SessionItem } from 'src/types';
|
||||
import { userStub } from 'test/fixtures/user.stub';
|
||||
|
||||
export const sessionStub = {
|
||||
valid: Object.freeze<SessionItem>({
|
||||
id: 'token-id',
|
||||
token: 'auth_token',
|
||||
userId: userStub.user1.id,
|
||||
user: userStub.user1,
|
||||
createdAt: new Date('2021-01-01'),
|
||||
updatedAt: new Date(),
|
||||
deviceType: '',
|
||||
deviceOS: '',
|
||||
updateId: 'uuid-v7',
|
||||
}),
|
||||
inactive: Object.freeze<SessionItem>({
|
||||
id: 'not_active',
|
||||
token: 'auth_token',
|
||||
userId: userStub.user1.id,
|
||||
user: userStub.user1,
|
||||
createdAt: new Date('2021-01-01'),
|
||||
updatedAt: new Date('2021-01-01'),
|
||||
deviceType: 'Mobile',
|
||||
deviceOS: 'Android',
|
||||
updateId: 'uuid-v7',
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user