[GH-ISSUE #4144] Remove post macro from api::core::emergency_access::post_emergency_access or add to routes! #1799

Closed
opened 2026-03-03 02:12:17 +03:00 by kerem · 1 comment
Owner

Originally created by @zacknewman on GitHub (Dec 7, 2023).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4144

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 GitHub (Dec 7, 2023). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4144 ### 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>
kerem closed this issue 2026-03-03 02:12:17 +03:00
Author
Owner

@zacknewman commented on GitHub (Dec 7, 2023):

Based on the most recent PR from @BlackDex, I think this got overlooked due to it being a Discussion and not Issue.

<!-- gh-comment-id:1843931889 --> @zacknewman commented on GitHub (Dec 7, 2023): Based on the most recent [PR](https://github.com/dani-garcia/vaultwarden/pull/4143) from @BlackDex, I think this got overlooked due to it being a Discussion and not Issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#1799
No description provided.