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

feat: v2 리팩토링 stock api #663

Merged
merged 5 commits into from
Aug 13, 2023
Merged

Conversation

JeongJiHwan
Copy link
Contributor

개요

stock api 에 ts-rest 적용하여 리팩토링

작업 사항

contract 작성
controller 작성
service 작성
error 처리

질문

  • 재고조회(search) api(page와 limit 외에 별도의 인자가 없습니다) 에서 발생할 수 있는 에러에 관한 조언을 구합니다.

  • 또한 재고조회에서 updatedAt 값이 zod에서 타입변환하는데 오류를 보이고 있습니다.
    updatedAt: '2023-03-12-16:19:26' 와 같은 형식으로 조회되는데 %d와 %T 사이에 있는 "-"가 문제를 일으키는게 아닌가하여 entity/entities/VStock.ts 에서 queryBuilder 부분을 수정해보았으나 반환되는 값은 그대로여서 이 부분에 대한 조언도 구합니다.

수정을 위한 PR로 피드백 부탁드립니다.

@JeongJiHwan JeongJiHwan linked an issue Aug 12, 2023 that may be closed by this pull request
@JeongJiHwan JeongJiHwan changed the title 616 v2 리팩토링 stock api feat: v2 리팩토링 stock api Aug 12, 2023
@scarf005 scarf005 requested review from scarf005 and nyj001012 August 12, 2023 08:25
backend/src/entity/entities/VStock.ts Show resolved Hide resolved
contracts/src/stock/schema.ts Outdated Show resolved Hide resolved
updatedAt 필드의 값을 Date->string 으로 처리

Co-authored-by: scarf <greenscarf005@gmail.com>
@scarf005 scarf005 self-requested a review August 13, 2023 02:12
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

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

image

LGTM!

@scarf005 scarf005 merged commit 80f6953 into develop Aug 13, 2023
@scarf005 scarf005 deleted the 616-v2-리팩토링-stock-api branch August 13, 2023 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 완료
Development

Successfully merging this pull request may close these issues.

☂️ v2 리팩토링 - stock API
2 participants