cachethq / cachet

🚦 The open-source status page system.
https://cachethq.io
MIT License
13.98k stars 1.55k forks source link

API: Subscriber always set to global. #4101

Closed dwalsh9 closed 1 year ago

dwalsh9 commented 4 years ago

Hello,

We're testing the API and when you set a subscriber to specific components, it always assigns the subscriber as global in the database, this means they get all notices irrespective.

API command: {"email":"noreply@example.com","verify":"false","components":["35","12"]} API Response:


    [data] => stdClass Object
        (
            [email] => noreply@example.com
            [verify_code] => *** 
            [updated_at] => 2020-08-24 12:13:32
            [created_at] => 2020-08-24 12:13:32
            [id] => 17
            [verified_at] => Monday 24th August 2020 10:00:00
            [subscriptions] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 173
                            [subscriber_id] => 17
                            [component_id] => 12
                            [created_at] => 2020-08-24 02:13:32
                            [updated_at] => 2020-08-24 02:13:32
                        )

                    [1] => stdClass Object
                        (
                            [id] => 174
                            [subscriber_id] => 17
                            [component_id] => 35
                            [created_at] => 2020-08-24 02:13:32
                            [updated_at] => 2020-08-24 02:13:32
                        )

                )

        )

)

Database:

Screen Shot 2020-08-24 at 12 15 17 pm

As you can see, global is set to 1, when it should be 0.

welcome[bot] commented 4 years ago

:wave: Thank you for opening your first issue. I'm just an automated bot that's here to help you get the information you need quicker, so please ignore this message if it doesn't apply to your issue. If you're looking for support, you should try the Slack group by registering your email address at https://cachethq-slack.herokuapp.com. Alternatively, email support@alt-three.com for our Professional support service (please note, this a paid service.) If you're issue is with documentation, you can suggest edits by clicking the Suggest Edits link on any page, or open an issue at https://github.com/CachetHQ/Docs

dwalsh9 commented 4 years ago

Any update on this? I'm just going to have to run a SQL query to fix it at this point

jbrooksuk commented 1 year ago

Thank you for your input on Cachet 2.x. We are shifting our attention and resources to Cachet 3.x and will no longer be supporting the 2.x version. If your feedback or issue is relevant to the 3.x series, we encourage you to engage with the new branch.

For more information on the Cachet rebuild and our plans for 3.x, you can read the announcement here.

We appreciate your understanding and look forward to your contributions to the new version.