Skip to content

fix restart/reload answer#176

Open
antonsoroko wants to merge 1 commit intoelgatito:masterfrom
antonsoroko:fix-restart-answer
Open

fix restart/reload answer#176
antonsoroko wants to merge 1 commit intoelgatito:masterfrom
antonsoroko:fix-restart-answer

Conversation

@antonsoroko
Copy link
Copy Markdown

alternatively we can use ctx.JSON(200, xbmc.NewView("", xbmc.ListItems{})) so then in curl answer you will see some text.
but using "" is consistent with other handlers.

fixes TypeError: 'bool' object is not subscriptable see elgatito/plugin.video.elementum#1170 (comment)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the HTTP responses for the /reload, /restart, and /shutdown API endpoints to avoid returning a JSON-parsable boolean-like body ("true") that can be misinterpreted by clients.

Changes:

  • Change successful responses for reload/restart/shutdown from ctx.String(200, "true") to ctx.String(200, "").
  • Align these endpoints’ “success” responses with the existing convention in the api package of returning an empty 200 body for action endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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.

2 participants