Skip to content

Commit

Permalink
feat: DTO 일부 수정, 설정 일부 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosial committed Jan 9, 2024
1 parent 4d0cfa2 commit 4b2c288
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/common/configs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const config: Config = {
},
swagger: {
enabled: true,
title: 'Nestjs FTW',
description: 'The nestjs API description',
version: '1.5',
title: 'PineMarket API',
description: '당근마켓 형재 파인마켓 Api',
version: '0.1',
path: 'docs',
},
graphql: {
Expand All @@ -21,7 +21,7 @@ const config: Config = {
sortSchema: true,
},
security: {
expiresIn: '2m',
expiresIn: '10m',
refreshIn: '7d',
bcryptSaltOrRound: 10,
},
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ async function bootstrap() {
const document = SwaggerModule.createDocument(app, options);

SwaggerModule.setup(swaggerConfig.path || 'api', app, document, {
customSiteTitle: 'Backend Generator',
customSiteTitle: 'Pinemarket API',
customfavIcon:
'https://avatars.githubusercontent.com/u/6936373?s=200&v=4',
'https://avatars.githubusercontent.com/u/153705459?s=200&v=4',
customJs: [
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-bundle.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-standalone-preset.min.js',
Expand Down
5 changes: 5 additions & 0 deletions src/posts/dto/createPost.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ export class CreatePostInput {
@ApiProperty({ description: 'The title of the post' }) // Swagger 데코레이터
@IsNotEmpty()
title: string;

@Field() // GraphQL 데코레이터
@ApiProperty({ description: 'Image Link' }) // Swagger 데코레이터
@IsNotEmpty()
imgUrl: string;
}
1 change: 1 addition & 0 deletions src/posts/posts.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class PostsController {
published: true,
title: createPostInput.title,
content: createPostInput.content,
imgUrl: createPostInput.imgUrl,
authorId: req.user.id,
},
});
Expand Down

0 comments on commit 4b2c288

Please sign in to comment.