Skip to content

Commit

Permalink
[#89]feat: 미대생 마감된 작품 조회
Browse files Browse the repository at this point in the history
  • Loading branch information
Arios67 committed Mar 30, 2022
1 parent b00f646 commit 3bb068d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ars/src/apis/art/art.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ArtResolver {

// 미대생 마감된 작품 조회
@UseGuards(GqlAuthAccessGuard)
@Query(() => Art)
@Query(() => [Art])
async fetchTimedOutArt(@CurrentUser() currentUser: ICurrentUser) {
return await this.artService.fetchTimedOutArt(currentUser);
}
Expand Down
4 changes: 2 additions & 2 deletions ars/src/apis/art/art.service.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ars/src/common/graphql/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 3bb068d

Please sign in to comment.