-
Notifications
You must be signed in to change notification settings - Fork 0
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
3298: Report Notification Subscription #164
3298: Report Notification Subscription #164
Conversation
…+ stimulus controller for subscribe button
…ribing to reports
…e + Reduced migraitons
} | ||
break; | ||
default: | ||
return new JsonResponse(['success' => false], 200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should throw an exception here instead.
BadRequestHttpException.
Then you do not have to send success => true
in the responses and it makes it clear that something unsupported has been requested
$subscriptions = $this->subscriptionRepository->findByCustom($userEmail, $content); | ||
$frequencies = $this->getFrequencies($subscriptions); | ||
|
||
return new JsonResponse(['success' => true, 'action' => 'unsubscribed', 'frequencies' => $frequencies], 200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
response code 200 already signifies success.
{% set number_of_columns = 11 %} | ||
|
||
{{ form_start(form) }} | ||
<div class="form-default"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block should be indented 1 tab.
Link to ticket
2398
Description
This PR introduces a new Subscription feature that enables users to opt into specific reports on a monthly or quarterly basis. Subscribed users will then receive an email containing the chosen report which covers the specified period for the relevant project.
Screenshot of the result
N/A
Checklist