Add support-settings private-api endpoints - #45
Conversation
Greptile SummaryThis PR adds private support-settings proxy endpoints. The main changes are:
Confidence Score: 5/5The changed flow looks safe to merge after a small proxy consistency cleanup.
src/server/handlers/private-api.ts Important Files Changed
Reviews (1): Last reviewed commit: "feat: add support-settings private-api e..." | Re-trigger Greptile |
| if (!username) { | ||
| return; | ||
| } | ||
| pipe(apiRequest(`support-settings/${username}`, "GET"), res); |
There was a problem hiding this comment.
Support Settings Query Dropped
When a client calls /private-api/support-settings with query parameters, this handler drops them before proxying to the backend. The neighboring read handlers forward req.query, so any backend-supported support-settings options would be silently ignored and callers would receive the default response instead.
| pipe(apiRequest(`support-settings/${username}`, "GET"), res); | |
| pipe(apiRequest(`support-settings/${username}`, "GET", {}, {}, req.query), res); |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a new ChangesSupport settings feature
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ExpressRoute
participant supportSettingsUpdate
participant UpstreamAPI
Client->>ExpressRoute: PUT /private-api/support-settings-update
ExpressRoute->>supportSettingsUpdate: handle request
supportSettingsUpdate->>supportSettingsUpdate: parseSupportSettingsPayload(req.body)
alt invalid payload
supportSettingsUpdate-->>Client: 400 error
else valid payload
supportSettingsUpdate->>UpstreamAPI: update support-settings/{username}
UpstreamAPI-->>supportSettingsUpdate: response
supportSettingsUpdate-->>Client: success response
end
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary by CodeRabbit
New Features
Bug Fixes
Tests