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
Enable slack notifications per entity #86
Enable slack notifications per entity #86
Conversation
api/models/config_keys.py
Outdated
@@ -24,6 +24,7 @@ class NotificationConfig(SnakeModel): | |||
violationThreshold: Optional[int] = Field(0, example=100) | |||
notifyEveryMinutes: Optional[int] = Field(0, example=15) | |||
emails: Optional[str] = Field("", example='john@email.com,doe@email.com') | |||
enableSlackNotifications: Optional[str] = Field(False, example=False) |
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.
Maybe we can declare it as a bool field.
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 it needs to be a string to be written in the config file
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.
🤔 But the daily report is declared as bool
and it works.
If we declare it as a string, the field definition should be Field("False", example="False")
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.
You were right :), I got mixed up
a3c0058
to
58572bc
Compare
8d4cc5e
to
404fa79
Compare
Move Slack Configuration from a global config to each area/camera