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

[BUG] Http GET CustomVariable does not get called #2859

Closed
2 tasks done
smudge1977 opened this issue May 4, 2024 · 1 comment
Closed
2 tasks done

[BUG] Http GET CustomVariable does not get called #2859

smudge1977 opened this issue May 4, 2024 · 1 comment
Labels
BUG Something isn't working

Comments

@smudge1977
Copy link

Is this a bug in companion itself or a module?

  • I believe this to be a bug in companion

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The API router does not seem to be allowing GET requests for a custom variable only POST to set it.

I an running version: 3.2.2 (3.2.2+6688-stable-7417d2a0)

Looking at main on GitHub:

// custom variables

This should get called and log a debug entry in the log on trying a GET

#customVariableGetValue = (req, res) => {

My test:

  • Create myvar custom variable
  • curl -X POST http://192.168.0.162:8888/api/custom-variable/myvar/value?value=99
    • Returns OK
    • UI Confirms changed value
    • Log has a debug entry
  • curl -X GET http://192.168.0.162:8888/api/custom-variable/myvar/value
    • Returns a full html page
    • UI No change would be expected in the value
    • Log has no debug entry

I therefore think this is an issue with the GET been registered in the router at L301

Steps To Reproduce

No response

Expected Behavior

No response

Environment (please complete the following information)

- OS:
- Browser:
- Companion Version:

Additional context

Think this might actually fix the above:
#2820

@smudge1977 smudge1977 added the BUG Something isn't working label May 4, 2024
@smudge1977
Copy link
Author

This merge is in latest Beta - I have now upgraded to 3.3.0 (3.3.0+6954-main-d753d965)

24.05.04 11:44:55 Service/HttpApi: Got HTTP custom variable get value name "myvar"
24.05.04 11:45:04 Service/HttpApi: Got HTTP custom variable set value name "myvar" to value "999"
24.05.04 11:45:07 Service/HttpApi: Got HTTP custom variable get value name "myvar"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant