Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/namecard comment #96

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open

Feature/namecard comment #96

wants to merge 17 commits into from

Conversation

Marades
Copy link
Collaborator

@Marades Marades commented Apr 20, 2022

  • 명함 방명록 조회
  • 명함 방명록 삭제
  • 명함 방명록 상단고정
  • 명함 방명록 비공개
  • 명함 방명록 작성
    위 5가지 API를 작업하였습니다

@AlwaysLee-12
Copy link
Collaborator

그리고 방명록 조회할 때, isMine만 같이 내려주면 해당 댓글이 사용자가 작성한 것인지 아닌건지에 대한 것에 따라 서버에서 따로 처리할 것 없이 클라쪽에서 이후에 해당 사용자가 작성한 것이 아니면 댓글에 대한 수정 작업을 할 수 없게한다던가 해서 처리해주는 것 아닌가용?

@Marades Marades closed this Apr 21, 2022
@Marades Marades reopened this Apr 21, 2022
ormconfig.ts Outdated Show resolved Hide resolved
Comment on lines +28 to +38
@ApiProperty({ example: '공개여부' })
@IsString()
@IsNotEmpty()
@Column({ default: false })
isPrivate: boolean;

@ApiProperty({ example: '고정여부' })
@IsString()
@IsNotEmpty()
@Column({ default: false })
isFix: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boolean type인데 @IsString()이 걸려있네욜

@Column()
nameCardId: number;

isMine?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거는 별도의 데코레이터 사용이 안되어있는 이유가 있나요?

HttpStatus,
Injectable,
} from '@nestjs/common';
import { HttpErrorByCode } from '@nestjs/common/utils/http-error-by-code.util';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build warning 안뜨게 제거해주세요

Comment on lines +62 to +70
if (fixedComments.length >= 3) {
throw new HttpException(
{
status: HttpStatus.NOT_ACCEPTABLE,
error: '명함의 방명록은 3개까지만 상단 고정이 가능합니다.',
},
HttpStatus.NOT_FOUND,
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3개까지니까 > 로 해야하지 않나용? 그리고 status code를 다른 걸로 수정해야 할 것 같어요

Comment on lines -19 to +38
makeFirstNameCard: userOnboardingStatusType;
makeFirstNameCard: 'WAIT' | 'DONE_WAIT' | 'DONE';

@IsNotEmpty()
@IsString()
@Column({ default: 'WAIT' })
saveMeetuMyAlbum: userOnboardingStatusType;
saveMeetuMyAlbum: 'WAIT' | 'DONE_WAIT' | 'DONE';

@IsNotEmpty()
@IsString()
@Column({ default: 'WAIT' })
addFriendNameCard: userOnboardingStatusType;
addFriendNameCard: 'WAIT' | 'DONE_WAIT' | 'DONE';

// @IsNotEmpty()
// @IsString()
// @Column({ default: 'WAIT' })
// makeNewCollection: userOnboardingStatusType;
// makeNewCollection: 'WAIT' | 'DONE_WAIT' | 'DONE';

@IsNotEmpty()
@IsString()
@Column({ default: 'WAIT' })
makeThreeNameCards: userOnboardingStatusType;
makeThreeNameCards: 'WAIT' | 'DONE_WAIT' | 'DONE';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

왜 enum에서 가져오는 거에서 이걸루 바꾼거야?!

@@ -13,6 +13,8 @@ export interface NameCardSchema {
contacts: ContactSchema[];
tmis: TmiSchema[];
personalSkills: PersonalSkillSchema[];
commentCount?: number;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional이 필요한가?? 없는 건 걍 0주면 될 것 같은데

@@ -3,6 +3,7 @@ import { createParamDecorator, ExecutionContext } from '@nestjs/common';
export const AuthUser = createParamDecorator(
(data: unknown, ctx: ExecutionContext) => {
const request = ctx.switchToHttp().getRequest();
request.user = { id: 1 };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 그리고 이 코드는 왜 들어가있는거지???(궁금)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants