-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Use MinimalAPI for marking notifications as read #16175
Conversation
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.
It's almost formatted and few suggestions to align with the current code base
src/OrchardCore.Modules/OrchardCore.Notifications/Assets/js/notification-manager.js
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Notifications/Assets/js/notification-manager.js
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Notifications/Assets/js/notification-manager.js
Show resolved
Hide resolved
|
||
public static class MarkAsReadEndpoints | ||
{ | ||
public const string RouteName = "NotificationsMarkAsRead"; |
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 like the route how it was in other code base, because it will be used once
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.
Not sure what you are asking here. This is a route name. This is used to identify the route path later
src/OrchardCore.Modules/OrchardCore.Notifications/Endpoints/Management/MarkAsReadEndpoints.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Notifications/Endpoints/Management/MarkAsReadEndpoints.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Notifications/wwwroot/Scripts/notification-manager.js
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Notifications/wwwroot/Scripts/notification-manager.js
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Notifications/wwwroot/Scripts/notification-manager.js
Show resolved
Hide resolved
Co-authored-by: Hisham Bin Ateya <[email protected]>
Please react to the remaining comments, then request for a review |
@hishamco everything that is worth taking was taken. Anything else? |
Move the route to mark notifications as read to use MinimalAPI.
Also, prevent sending a request to request to the server is one is already being sent. This will prevent sending multiple unnecessary request to the server.