mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 12:15:31 +00:00
Update API for marking a notification as "read" (#228)
This commit is contained in:
@ -42,10 +42,12 @@ class InvenTreeNotification extends InvenTreeModel {
|
||||
*/
|
||||
Future<void> dismiss() async {
|
||||
|
||||
await api.post(
|
||||
"${url}read/",
|
||||
);
|
||||
|
||||
if (api.apiVersion >= 82) {
|
||||
// "Modern" API endpoint operates a little differently
|
||||
await update(values: {"read": "true"});
|
||||
} else {
|
||||
await api.post("${url}read/");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user