aboutsummaryrefslogtreecommitdiff
path: root/src/api/core/mod.rs
diff options
context:
space:
mode:
authorGeekCornerGH <[email protected]>2023-06-11 13:28:18 +0200
committerGeekCornerGH <[email protected]>2023-06-11 13:28:18 +0200
commit2d66292350d352c3ea41db08d4c2de33898e9806 (patch)
treed41f087f7a173c24f6d6f0da5eb378e69bd0d4c4 /src/api/core/mod.rs
parentadf67a8ee887d21e104adfa8b6521d7971f5a1f1 (diff)
downloadvaultwarden-2d66292350d352c3ea41db08d4c2de33898e9806.tar.gz
vaultwarden-2d66292350d352c3ea41db08d4c2de33898e9806.zip
feat: Push Notifications
Co-authored-by: samb-devel <[email protected]> Co-authored-by: Zoruk <[email protected]>
Diffstat (limited to 'src/api/core/mod.rs')
-rw-r--r--src/api/core/mod.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs
index fdf64cd6..00cfcf85 100644
--- a/src/api/core/mod.rs
+++ b/src/api/core/mod.rs
@@ -14,7 +14,6 @@ pub use sends::purge_sends;
pub use two_factor::send_incomplete_2fa_notifications;
pub fn routes() -> Vec<Route> {
- let mut device_token_routes = routes![clear_device_token, put_device_token];
let mut eq_domains_routes = routes![get_eq_domains, post_eq_domains, put_eq_domains];
let mut hibp_routes = routes![hibp_breach];
let mut meta_routes = routes![alive, now, version, config];
@@ -28,7 +27,6 @@ pub fn routes() -> Vec<Route> {
routes.append(&mut organizations::routes());
routes.append(&mut two_factor::routes());
routes.append(&mut sends::routes());
- routes.append(&mut device_token_routes);
routes.append(&mut eq_domains_routes);
routes.append(&mut hibp_routes);
routes.append(&mut meta_routes);
@@ -57,37 +55,6 @@ use crate::{
util::get_reqwest_client,
};
-#[put("/devices/identifier/<uuid>/clear-token")]
-fn clear_device_token(uuid: &str) -> &'static str {
- // This endpoint doesn't have auth header
-
- let _ = uuid;
- // uuid is not related to deviceId
-
- // This only clears push token
- // https://github.com/bitwarden/core/blob/master/src/Api/Controllers/DevicesController.cs#L109
- // https://github.com/bitwarden/core/blob/master/src/Core/Services/Implementations/DeviceService.cs#L37
- ""
-}
-
-#[put("/devices/identifier/<uuid>/token", data = "<data>")]
-fn put_device_token(uuid: &str, data: JsonUpcase<Value>, headers: Headers) -> Json<Value> {
- let _data: Value = data.into_inner().data;
- // Data has a single string value "PushToken"
- let _ = uuid;
- // uuid is not related to deviceId
-
- // TODO: This should save the push token, but we don't have push functionality
-
- Json(json!({
- "Id": headers.device.uuid,
- "Name": headers.device.name,
- "Type": headers.device.atype,
- "Identifier": headers.device.uuid,
- "CreationDate": crate::util::format_date(&headers.device.created_at),
- }))
-}
-
#[derive(Serialize, Deserialize, Debug)]
#[allow(non_snake_case)]
struct GlobalDomain {