-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
feat: add createdAfter filtering to the Notifications #23173
Conversation
Changed Packages
|
Uffizzi Cluster |
c81e1a8
to
38261ab
Compare
Thanks for the contribution! |
79e182c
to
b9a44a5
Compare
Signed-off-by: Marek Libra <marek.libra@gmail.com>
Signed-off-by: Marek Libra <marek.libra@gmail.com>
Signed-off-by: Marek Libra <marek.libra@gmail.com>
b9a44a5
to
672f8e3
Compare
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.
Nice! 👍
All comments optional, could be addressed in followup PRs too
@@ -98,6 +98,9 @@ export class DatabaseNotificationsStore implements NotificationsStore { | |||
options: NotificationGetOptions | NotificationModifyOptions, | |||
) => { | |||
const { user } = options; | |||
const isSQLite = this.db.client.config.client.includes('sqlite3'); | |||
// const isPsql = this.db.client.config.client.includes('pg'); |
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.
// const isPsql = this.db.client.config.client.includes('pg'); |
🧹
@@ -204,6 +204,13 @@ export async function createRouter( | |||
opts.read = false; | |||
// or keep undefined | |||
} | |||
if (req.query.created_after) { | |||
const sinceEpoch = Date.parse(req.query.created_after.toString()); |
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.
const sinceEpoch = Date.parse(req.query.created_after.toString()); | |
const sinceEpoch = Date.parse(String(req.query.created_after)); |
Ever so slightly more safer way to convert to a string, in case of undefined
/ null
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
Hey, I just made a Pull Request!
The notifications can be newly filtered based on the
Created Date
field.The filter on the UI side contains a list of predefined values instead of exact date+time selection.
✔️ Checklist
Signed-off-by
line in the message. (more info)Depends on (needs rebase):