-
Notifications
You must be signed in to change notification settings - Fork 3
feat: 주문api 수정 #478
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: 주문api 수정 #478
Conversation
feat: 주문api 수정
|
Caution Review failedThe pull request is closed. WalkthroughCentralizes HTTP calls by introducing a shared Axios instance and refactors createOrder/getOrderDetails to use it. Simplifies error handling and logging in OrderDetailsPage by delegating to react-query. Removes a user-facing alert in RemittanceWaitPage after order creation. No public API signatures changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant ODP as OrderDetailsPage
participant RQ as react-query
participant API as api (Axios instance)
participant S as Server
U->>ODP: Navigate to Order Details
ODP->>RQ: useQuery(queryFn = getOrderDetails)
RQ->>API: GET /orders/{storeId}/tables/{tableId}
API->>S: HTTP GET (withCredentials)
S-->>API: 200/4xx response
API-->>RQ: data/error
RQ-->>ODP: data/error (default handling)
Note over ODP: Logs orderDetails if present
sequenceDiagram
autonumber
actor U as User
participant RWP as RemittanceWaitPage
participant API as api (Axios instance)
participant S as Server
participant Nav as Router
U->>RWP: Submit order
RWP->>API: POST /orders (payload, withCredentials)
API->>S: HTTP POST
S-->>API: 200/4xx response
API-->>RWP: data/error
alt success
RWP->>RWP: Store depositorName, clear cart
RWP->>Nav: Navigate to next page
else error
RWP->>RWP: Handle error (no alert)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
작업 내용
문제점 및 어려움
해결 방안
공유 사항
Summary by CodeRabbit