1
1
//! Implementation of the `GET /v1/votes/plan/account-votes/:account_id` endpoint
2
2
3
+ use std:: sync:: Arc ;
4
+
5
+ use poem:: web:: { Data , Path } ;
6
+ use poem_extensions:: { response, UniResponse :: T200 } ;
7
+ use poem_openapi:: payload:: Json ;
8
+
3
9
use crate :: {
4
10
service:: common:: {
5
11
objects:: account_votes:: { AccountId , AccountVote } ,
@@ -10,11 +16,6 @@ use crate::{
10
16
} ,
11
17
state:: State ,
12
18
} ;
13
- use poem:: web:: { Data , Path } ;
14
- use poem_extensions:: response;
15
- use poem_extensions:: UniResponse :: T200 ;
16
- use poem_openapi:: payload:: Json ;
17
- use std:: sync:: Arc ;
18
19
19
20
/// All responses
20
21
pub ( crate ) type AllResponses = response ! {
@@ -34,11 +35,11 @@ pub(crate) type AllResponses = response! {
34
35
/// ## Responses
35
36
///
36
37
/// * 200 with a JSON array of the number of voted proposals in a plan.
37
- /// * 500 Server Error - If anything within this function fails unexpectedly. (Possible but unlikely)
38
+ /// * 500 Server Error - If anything within this function fails unexpectedly. (Possible
39
+ /// but unlikely)
38
40
/// * 503 Service Unavailable - Service has not started, do not send other requests.
39
41
pub ( crate ) async fn endpoint (
40
- _state : Data < & Arc < State > > ,
41
- _account_id : Path < AccountId > ,
42
+ _state : Data < & Arc < State > > , _account_id : Path < AccountId > ,
42
43
) -> AllResponses {
43
44
// otherwise everything seems to be A-OK
44
45
T200 ( OK ( Json ( Vec :: new ( ) ) ) )
0 commit comments