feat: update file output paths and add feedback tracking to service schema

- Modified file output paths in LiveKitRoomService to utilize the BUCKET_NAME environment variable for dynamic S3 storage.
- Introduced a new `feedbacked` field in ServiceSchema to track whether a user has provided feedback for a service, enhancing user interaction capabilities.
- Cleaned up the ServiceFeedback schema by refining the resolve function for better clarity and consistency.
This commit is contained in:
2024-12-05 22:11:40 +07:00
parent 1b7329bb44
commit 37b0086b4d
3 changed files with 20 additions and 11 deletions

View File

@@ -1,10 +1,5 @@
import { Inject, Injectable } from '@nestjs/common'
import {
Pothos,
PothosRef,
PothosSchema,
SchemaBuilderToken,
} from '@smatch-corp/nestjs-pothos'
import { Pothos, PothosRef, PothosSchema, SchemaBuilderToken } from '@smatch-corp/nestjs-pothos'
import { Builder } from '../Graphql/graphql.builder'
import { PrismaService } from '../Prisma/prisma.service'
@@ -63,9 +58,8 @@ export class ServiceFeedbackSchema extends PothosSchema {
serviceFeedbacks: t.prismaField({
type: [this.serviceFeedback()],
args: this.builder.generator.findManyArgs('ServiceFeedback'),
description:
'Retrieve a list of service feedbacks with optional filtering, ordering, and pagination.',
resolve: async (query, root, args, ctx, info) => {
description: 'Retrieve a list of service feedbacks with optional filtering, ordering, and pagination.',
resolve: async (query, _root, args, _ctx, _info) => {
return await this.prisma.serviceFeedback.findMany({
...query,
skip: args.skip ?? undefined,