Skip to content

Commit 739a2b5

Browse files
committed
chore: format code
1 parent cc4b995 commit 739a2b5

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

catalyst-gateway/bin/src/service/api/v0/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//! `v0` Endpoints
22
3-
use crate::service::common::tags::ApiTags;
43
use poem_openapi::{payload::Binary, OpenApi};
54

5+
use crate::service::common::tags::ApiTags;
6+
67
mod message_post;
78

89
/// `v0` API Endpoints

catalyst-gateway/bin/src/service/api/v1/account_votes_get.rs

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
//! Implementation of the `GET /v1/votes/plan/account-votes/:account_id` endpoint
22
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+
39
use crate::{
410
service::common::{
511
objects::account_votes::{AccountId, AccountVote},
@@ -10,11 +16,6 @@ use crate::{
1016
},
1117
state::State,
1218
};
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;
1819

1920
/// All responses
2021
pub(crate) type AllResponses = response! {
@@ -34,11 +35,11 @@ pub(crate) type AllResponses = response! {
3435
/// ## Responses
3536
///
3637
/// * 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)
3840
/// * 503 Service Unavailable - Service has not started, do not send other requests.
3941
pub(crate) async fn endpoint(
40-
_state: Data<&Arc<State>>,
41-
_account_id: Path<AccountId>,
42+
_state: Data<&Arc<State>>, _account_id: Path<AccountId>,
4243
) -> AllResponses {
4344
// otherwise everything seems to be A-OK
4445
T200(OK(Json(Vec::new())))

catalyst-gateway/bin/src/service/api/v1/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
//! `v1` Endpoints
22
3+
use std::sync::Arc;
4+
5+
use poem::web::{Data, Path};
6+
use poem_openapi::OpenApi;
7+
38
use crate::{
49
service::common::{objects::account_votes::AccountId, tags::ApiTags},
510
state::State,
611
};
7-
use poem::web::{Data, Path};
8-
use poem_openapi::OpenApi;
9-
use std::sync::Arc;
1012

1113
mod account_votes_get;
1214

@@ -22,9 +24,7 @@ impl V1Api {
2224
)]
2325
/// Votes for
2426
async fn get_account_votes(
25-
&self,
26-
state: Data<&Arc<State>>,
27-
account_id: Path<AccountId>,
27+
&self, state: Data<&Arc<State>>, account_id: Path<AccountId>,
2828
) -> account_votes_get::AllResponses {
2929
account_votes_get::endpoint(state, account_id).await
3030
}

0 commit comments

Comments
 (0)