Skip to content

Commit

Permalink
Merge pull request #126 from LocalMingle/dev
Browse files Browse the repository at this point in the history
[작업중]: 이벤트 조회 에러 수정중
  • Loading branch information
kimjonghwa230412 authored Nov 2, 2023
2 parents 6578ecb + 55541b1 commit be7e288
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/events/dto/create-event.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IsNotEmpty,
MaxLength,
Min,
Max,
} from 'class-validator';

export class CreateEventDto {
Expand All @@ -21,6 +22,7 @@ export class CreateEventDto {
@IsInt()
@IsNotEmpty()
@Min(1)
@Max(50)
@ApiProperty({
example: 10,
})
Expand Down
2 changes: 1 addition & 1 deletion src/events/events.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class EventsController {
// 전체 조회 시 이벤트 호스트와 참가자 수 반환
const event = events.map((item) => {
const { GuestEvents, HostEvents, ...rest } = item;
const hostUser = HostEvents[0].User.UserDetail;
const hostUser = HostEvents[0]?.User?.UserDetail || null

return {
event: rest,
Expand Down
2 changes: 1 addition & 1 deletion src/searches/searches.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller, Get, Injectable, Query } from '@nestjs/common';
import { SearchesService } from './searches.service';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { SearchesDto } from './searches.dto.ts/searches.dto';
import { SearchesDto } from './searches.dto/searches.dto';

@Controller('search')
@Injectable()
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/searches/searches.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { PrismaService } from '../prisma/prisma.service';
import { SearchesDto } from './searches.dto.ts/searches.dto';
import { SearchesDto } from './searches.dto/searches.dto';

@Injectable()
export class SearchesService {
Expand Down

0 comments on commit be7e288

Please sign in to comment.