meirim-org / meirim

Meirim is an open-source smart city application that facilitates transparency in urban planning.
MIT License
56 stars 24 forks source link

Manage alert subscription status #675

Open GalGend opened 1 year ago

GalGend commented 1 year ago

Currently, we have 2 subscription states for alerts- subscribed or not exist (deleted). In the future, we'd want users to be able to have an alert, but to be unsubscribed to it, or to have specific types of subscriptions (for example, digest/ daily/ website only etc).

Therefore, this task is to allow us to manage subscription statuses for alerts: 1) Add a new field with the key 'subscription' in the alert table. It can have the following values (1- subscribed, 0- unsubscribed). Existing alerts should have get the values of 1. New alerts will also get that value.

2) Add an API endpoint to manage it, meaning change the value from 1 to 0 (or to any supported value)

Follow-up tickets will be for implementing it in the digest and in the website

yaelal commented 1 year ago

@GalGend hi i wrote code in branch issue_675_subscription i have iisues testing. but is this what u meant to do? thanks

yaelal commented 1 year ago

pr https://github.com/meirim-org/meirim/pull/680 seems to work now