From aeb9f69b59f150b4baf2bd62e918bd4689baaec8 Mon Sep 17 00:00:00 2001 From: DarkSky Date: Fri, 1 Mar 2024 17:32:55 +0800 Subject: [PATCH] fix: type import --- packages/backend/server/src/app.module.ts | 1 + packages/backend/server/src/core/auth/service.ts | 2 +- packages/backend/server/src/core/features/service.ts | 2 +- packages/backend/server/src/core/quota/service.ts | 2 +- packages/backend/server/src/core/users/users.ts | 2 +- packages/backend/server/src/core/workspaces/permission.ts | 2 +- .../backend/server/src/core/workspaces/resolvers/workspace.ts | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/backend/server/src/app.module.ts b/packages/backend/server/src/app.module.ts index d782134a7f06a..8c0ced3408d2d 100644 --- a/packages/backend/server/src/app.module.ts +++ b/packages/backend/server/src/app.module.ts @@ -51,6 +51,7 @@ export const FunctionalityModules = [ adapter: new TransactionalAdapterPrisma({ prismaInjectionToken: PrismaClient, }), + enableTransactionProxy: true, }), ], }), diff --git a/packages/backend/server/src/core/auth/service.ts b/packages/backend/server/src/core/auth/service.ts index bd4c12a1c0bab..59eccda82db2b 100644 --- a/packages/backend/server/src/core/auth/service.ts +++ b/packages/backend/server/src/core/auth/service.ts @@ -6,7 +6,7 @@ import { InternalServerErrorException, UnauthorizedException, } from '@nestjs/common'; -import { InjectTransaction, Transaction } from '@nestjs-cls/transactional'; +import { InjectTransaction, type Transaction } from '@nestjs-cls/transactional'; import { TransactionalAdapterPrisma } from '@nestjs-cls/transactional-adapter-prisma'; import { hash, verify } from '@node-rs/argon2'; import { Algorithm, sign, verify as jwtVerify } from '@node-rs/jsonwebtoken'; diff --git a/packages/backend/server/src/core/features/service.ts b/packages/backend/server/src/core/features/service.ts index d92820a9d4592..b7573ec000a53 100644 --- a/packages/backend/server/src/core/features/service.ts +++ b/packages/backend/server/src/core/features/service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectTransaction, - Transaction, + type Transaction, Transactional, } from '@nestjs-cls/transactional'; import { TransactionalAdapterPrisma } from '@nestjs-cls/transactional-adapter-prisma'; diff --git a/packages/backend/server/src/core/quota/service.ts b/packages/backend/server/src/core/quota/service.ts index 24df0ff79bcef..03cfb13a064b4 100644 --- a/packages/backend/server/src/core/quota/service.ts +++ b/packages/backend/server/src/core/quota/service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectTransaction, - Transaction, + type Transaction, Transactional, } from '@nestjs-cls/transactional'; import { TransactionalAdapterPrisma } from '@nestjs-cls/transactional-adapter-prisma'; diff --git a/packages/backend/server/src/core/users/users.ts b/packages/backend/server/src/core/users/users.ts index a90b6bd2fa9a4..760cdab4f666d 100644 --- a/packages/backend/server/src/core/users/users.ts +++ b/packages/backend/server/src/core/users/users.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { InjectTransaction, Transaction } from '@nestjs-cls/transactional'; +import { InjectTransaction, type Transaction } from '@nestjs-cls/transactional'; import { TransactionalAdapterPrisma } from '@nestjs-cls/transactional-adapter-prisma'; @Injectable() diff --git a/packages/backend/server/src/core/workspaces/permission.ts b/packages/backend/server/src/core/workspaces/permission.ts index 768cf50b6966a..2a350552d7a85 100644 --- a/packages/backend/server/src/core/workspaces/permission.ts +++ b/packages/backend/server/src/core/workspaces/permission.ts @@ -1,7 +1,7 @@ import { ForbiddenException, Injectable } from '@nestjs/common'; import { InjectTransaction, - Transaction, + type Transaction, Transactional, } from '@nestjs-cls/transactional'; import { TransactionalAdapterPrisma } from '@nestjs-cls/transactional-adapter-prisma'; diff --git a/packages/backend/server/src/core/workspaces/resolvers/workspace.ts b/packages/backend/server/src/core/workspaces/resolvers/workspace.ts index 4adcdcdf210b4..c156ee7861cc2 100644 --- a/packages/backend/server/src/core/workspaces/resolvers/workspace.ts +++ b/packages/backend/server/src/core/workspaces/resolvers/workspace.ts @@ -15,7 +15,7 @@ import { ResolveField, Resolver, } from '@nestjs/graphql'; -import { InjectTransaction, Transaction } from '@nestjs-cls/transactional'; +import { InjectTransaction, type Transaction } from '@nestjs-cls/transactional'; import { TransactionalAdapterPrisma } from '@nestjs-cls/transactional-adapter-prisma'; import { type User } from '@prisma/client'; import { getStreamAsBuffer } from 'get-stream';