Skip to content

API doc for Timers uses POST for verbs, code uses GET #3582

Description

@pdriley

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I wasn't able to get firebot to respond with anything other than an error when trying to enable a timer via curl/the API. Further digging looks like the api assigns them to GET in 'v1-router.ts' with

// Action can be "toggle", "enable", "disable" or "clear"
router.route("/timers/:timerId/:action")
.get(timers.updateTimerById);

Expected Behavior

Websocket should update timers when accessed with POST command (in lieu or additionally, or update API documentation accordingly)

Thanks

Steps To Reproduce

From console:
curl -X GET http://localhost:7472/api/v1/timers/c6235a1f-4548-4967-acd1-ae8ccf6067ce/enable
works
curl -X POST http://localhost:7472/api/v1/timers/c6235a1f-4548-4967-acd1-ae8ccf6067ce/enable
returns not found

Version

5.66.7

What operating system are you using Firebot on?

Linux Distro

Relevant log output

Contact Details (Optional)

Squidgy#5069

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    • Status
      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions