[chore]: Change reload approach to receive decofile as payload#1002
Conversation
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
|
Caution Review failedThe pull request is closed. WalkthroughThe PR replaces a query-parameter-based polling mechanism in the reload endpoint with direct body-based decofile handling. The new implementation parses JSON from the request body, validates the decofile field, updates state.release directly, and returns a success confirmation instead of elapsed time metrics. Polling loops, file reads, and timeout logic are removed. Changes
Sequence DiagramsequenceDiagram
actor Client
participant Handler as reload Handler
participant State as state.release
participant Response
Client->>Handler: POST body: {decofile: "..."}
Handler->>Handler: Parse JSON from body
alt JSON invalid
Handler->>Response: 400 "Invalid JSON in request body"
Response->>Client: Error
else decofile missing
Handler->>Response: 400 "Missing decofile in request body"
Response->>Client: Error
else Valid decofile
Handler->>State: set(decofile)
State-->>Handler: OK
Handler->>Response: {"success": true}
Response->>Client: 200 Success
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
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 |
Tagging OptionsShould a new tag be published when this PR is merged?
|
Summary by CodeRabbit