chore: update subproject commit and enhance ServiceFeedback schema
- Updated the subproject commit reference in epess-database to the latest version. - Added Logger to the ServiceFeedback schema for improved logging of arguments during feedback submission. - Modified the Prisma types to include new Quiz and Question entities, enhancing the schema's capabilities and data structure.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Inject, Injectable } from '@nestjs/common'
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common'
|
||||
import { Pothos, PothosRef, PothosSchema, SchemaBuilderToken } from '@smatch-corp/nestjs-pothos'
|
||||
import { Builder } from '../Graphql/graphql.builder'
|
||||
import { PrismaService } from '../Prisma/prisma.service'
|
||||
@@ -94,6 +94,7 @@ export class ServiceFeedbackSchema extends PothosSchema {
|
||||
if (!ctx.http?.me) throw new Error('Unauthorized')
|
||||
// allow only when user is CUSTOMER and order is completed
|
||||
if (ctx.http?.me?.role !== Role.CUSTOMER) throw new Error('Unauthorized')
|
||||
Logger.log(`args: ${JSON.stringify(args)}`)
|
||||
const order = await this.prisma.order.findFirst({
|
||||
where: {
|
||||
id: args.orderId,
|
||||
|
||||
Reference in New Issue
Block a user