From 3bb068d7b8676f4986cb3f0cbc57043e0994fe73 Mon Sep 17 00:00:00 2001 From: Arios67 Date: Wed, 30 Mar 2022 17:51:56 +0900 Subject: [PATCH] =?UTF-8?q?[#89]feat:=20=EB=AF=B8=EB=8C=80=EC=83=9D=20?= =?UTF-8?q?=EB=A7=88=EA=B0=90=EB=90=9C=20=EC=9E=91=ED=92=88=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ars/src/apis/art/art.resolver.ts | 2 +- ars/src/apis/art/art.service.ts | 4 ++-- ars/src/common/graphql/schema.gql | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ars/src/apis/art/art.resolver.ts b/ars/src/apis/art/art.resolver.ts index 6be934e..7b7e198 100644 --- a/ars/src/apis/art/art.resolver.ts +++ b/ars/src/apis/art/art.resolver.ts @@ -45,7 +45,7 @@ export class ArtResolver { // 미대생 마감된 작품 조회 @UseGuards(GqlAuthAccessGuard) - @Query(() => Art) + @Query(() => [Art]) async fetchTimedOutArt(@CurrentUser() currentUser: ICurrentUser) { return await this.artService.fetchTimedOutArt(currentUser); } diff --git a/ars/src/apis/art/art.service.ts b/ars/src/apis/art/art.service.ts index 0067187..852fffc 100644 --- a/ars/src/apis/art/art.service.ts +++ b/ars/src/apis/art/art.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { Connection, getRepository, MoreThan, Not, Repository } from 'typeorm'; +import { Connection, IsNull, MoreThan, Not, Repository } from 'typeorm'; import { ArtImage } from '../artImage/entities/artImage.entity'; import { Art } from './entities/art.entity'; @@ -101,7 +101,7 @@ export class ArtService { async fetchTimedOutArt(currentUser) { const art = await this.artRepository.find({ withDeleted: true, - where: { user: currentUser.id, deletedAt: Not('null') }, + where: { user: currentUser.id, deletedAt: Not(IsNull()) }, }); console.log(art); return art; diff --git a/ars/src/common/graphql/schema.gql b/ars/src/common/graphql/schema.gql index 04d4bd1..3b84283 100644 --- a/ars/src/common/graphql/schema.gql +++ b/ars/src/common/graphql/schema.gql @@ -123,7 +123,7 @@ type Query { fetchArt(artId: String!): Art! fetchArtImages(artId: String!): [ArtImage!]! fetchAuctionArts: [Art!]! - fetchTimedOutArt: Art! + fetchTimedOutArt: [Art!]! fetchTransactionCompletedArts: [Art!]! fetchLikeArt: [Art!]! fetchBoard(boardId: String!): Board!