get notifications

This commit is contained in:
realaravinth
2021-05-10 15:38:09 +05:30
parent aa0c30f1bd
commit 91ca00ea79
18 changed files with 241 additions and 25 deletions

View File

@@ -16,6 +16,7 @@
*/
mod add;
mod get;
pub mod routes {
@@ -30,7 +31,7 @@ pub mod routes {
Notifications {
add: "/api/v1/notifications/add",
mark_read: "/api/v1/notifications/read/",
get: "/api/v1/notifications/get/",
get: "/api/v1/notifications/get",
}
}
}
@@ -46,4 +47,11 @@ pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
Methods::ProtectPost,
add::add_notification
);
define_resource!(
cfg,
V1_API_ROUTES.notifications.get,
Methods::ProtectGet,
get::get_notification
);
}