Skip to content

Commit

Permalink
Merge pull request #115 from sopt-makers/refac/project
Browse files Browse the repository at this point in the history
feat: Get Projects Available, Founding Property
  • Loading branch information
Lim-Changi authored Nov 3, 2023
2 parents e42876e + b672022 commit fd97598
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ export class PlaygroundProjectResponseDto {
detail: string;
logoImage: string;
thumbnailImage: string;
isAvailable: boolean;
isFounding: boolean;
links: PlaygroundLink[];
}
4 changes: 3 additions & 1 deletion src/internal/playground/playground.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { Link } from './dto/link';
import { MemberRequestDto } from 'src/members/dtos/member-request.dto';
import { MemberListResponseDto } from 'src/members/dtos/member-response.dto';
import { GetProjectsRequestDto } from '../../projects/dtos/get-projects-request.dto';
import { elementAt } from 'rxjs';

@Injectable()
export class PlaygroundService {
Expand Down Expand Up @@ -46,6 +45,8 @@ export class PlaygroundService {
detail: response.detail,
logoImage: response.logoImage,
thumbnailImage: response.thumbnailImage,
isAvailable: response.isAvailable,
isFounding: response.isFounding,
link: links,
};
}
Expand All @@ -58,6 +59,7 @@ export class PlaygroundService {
const platform = dto?.platform;

const response = await this.playgroundRepository.getAllProjects();

// 중복제거 로직 : 추후 제거 예정
const uniqueResponse: PlaygroundProjectResponseDto[] = dropDuplication(
response,
Expand Down
14 changes: 14 additions & 0 deletions src/projects/dtos/projects-response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ export class ProjectsResponseDto {
})
thumbnailImage: string | null;

@ApiProperty({
type: Boolean,
required: true,
description: '서비스 이용 가능 여부',
})
isAvailable: boolean;

@ApiProperty({
type: Boolean,
required: true,
description: '창업중인지 여부',
})
isFounding: boolean;

@ApiProperty({
type: [Link],
required: true,
Expand Down

0 comments on commit fd97598

Please sign in to comment.