auto format
This commit is contained in:
11
codegen.ts
11
codegen.ts
@@ -1,14 +1,13 @@
|
|||||||
|
|
||||||
import type { CodegenConfig } from '@graphql-codegen/cli';
|
import type { CodegenConfig } from '@graphql-codegen/cli';
|
||||||
|
|
||||||
const config: CodegenConfig = {
|
const config: CodegenConfig = {
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
schema: "https://api.epess.org/graphql",
|
schema: 'https://api.epess.org/v1/graphql',
|
||||||
generates: {
|
generates: {
|
||||||
"./src/graphql/types/graphql.d.ts": {
|
'./src/graphql/types/graphql.d.ts': {
|
||||||
plugins: ["typescript", "typescript-resolvers"]
|
plugins: ['typescript', 'typescript-resolvers'],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"prisma:migrate": "npx prisma migrate dev --schema=./epess-database/prisma/schema.prisma",
|
"prisma:migrate": "npx prisma migrate dev --schema=./epess-database/prisma/schema.prisma",
|
||||||
"prisma:push": "npx prisma db push --schema=./epess-database/prisma/schema.prisma",
|
"prisma:push": "npx prisma db push --schema=./epess-database/prisma/schema.prisma",
|
||||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||||
|
"prettier": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"test:cov": "jest --coverage",
|
"test:cov": "jest --coverage",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Global, Module } from '@nestjs/common';
|
import { Global, Module } from '@nestjs/common';
|
||||||
import { CenterStaffSchema } from './centerstaff.schema';
|
import { CenterStaffSchema } from './centerstaff.schema';
|
||||||
|
|
||||||
@Global()
|
@Global()
|
||||||
@Module({
|
@Module({
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { PrismaService } from '../Prisma/prisma.service';
|
|||||||
export class ClerkService {
|
export class ClerkService {
|
||||||
constructor(private readonly prisma: PrismaService) {}
|
constructor(private readonly prisma: PrismaService) {}
|
||||||
webhook(body: any) {
|
webhook(body: any) {
|
||||||
|
|
||||||
// get the event type
|
// get the event type
|
||||||
const eventType = body.type;
|
const eventType = body.type;
|
||||||
// dispatch the event
|
// dispatch the event
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { PrismaService } from '../Prisma/prisma.service';
|
|||||||
export class PrismaContextMiddleware implements NestMiddleware {
|
export class PrismaContextMiddleware implements NestMiddleware {
|
||||||
constructor(private readonly prisma: PrismaService) {}
|
constructor(private readonly prisma: PrismaService) {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
use(req: any, res: any, next: () => void) {
|
use(req: any, res: any, next: () => void) {
|
||||||
req.prisma = this.prisma; // Attach Prisma client to request object
|
req.prisma = this.prisma; // Attach Prisma client to request object
|
||||||
next();
|
next();
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user