refactor(server): import prisma from @prisma/client (#5863)

This commit is contained in:
liuyi
2024-02-22 07:46:57 +00:00
parent f2c5786dd0
commit 4d421a324f
24 changed files with 82 additions and 218 deletions

View File

@@ -1,6 +1,7 @@
import { Injectable, Logger } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';
import { Config, PrismaService } from '../../fundamentals';
import { Config } from '../../fundamentals';
import { FeatureService } from './service';
import { FeatureType } from './types';
@@ -12,7 +13,7 @@ export class FeatureManagementService {
constructor(
private readonly feature: FeatureService,
private readonly prisma: PrismaService,
private readonly prisma: PrismaClient,
private readonly config: Config
) {}

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';
import { PrismaService } from '../../fundamentals';
import { UserType } from '../users/types';
import { WorkspaceType } from '../workspaces/types';
import { FeatureConfigType, getFeature } from './feature';
@@ -8,7 +8,7 @@ import { FeatureKind, FeatureType } from './types';
@Injectable()
export class FeatureService {
constructor(private readonly prisma: PrismaService) {}
constructor(private readonly prisma: PrismaClient) {}
async getFeaturesVersion() {
const features = await this.prisma.features.findMany({