Remove post macro from api::core::emergency_access::post_emergency_access or add to routes! #1323

Closed
opened 2026-04-06 01:45:55 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @zacknewman on 12/7/2023

Discussed in https://github.com/dani-garcia/vaultwarden/discussions/4076

Originally posted by zacknewman November 16, 2023
api::core::emergency_access::post_emergency_access is only ever used once in put_emergency_access, and the Route is not added by routes! in routes. Three fixes are:

  • add the Route via routes! in routes.
  • Remove the post macro.
  • Remove the function altogether and integrate its body into put_emergency_access.
*Originally created by @zacknewman on 12/7/2023* ### Discussed in https://github.com/dani-garcia/vaultwarden/discussions/4076 <div type='discussions-op-text'> <sup>Originally posted by **zacknewman** November 16, 2023</sup> [`api::core::emergency_access::post_emergency_access`](https://github.com/dani-garcia/vaultwarden/blob/main/src/api/core/emergency_access.rs#L101) is only ever used once in `put_emergency_access`, and the `Route` is not added by `routes!` in `routes`. Three fixes are: * add the `Route` via `routes!` in `routes`. * Remove the `post` macro. * Remove the function altogether and integrate its body into `put_emergency_access`.</div>
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1323