mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-02 21:49:22 +00:00
Apply linting
This commit is contained in:
parent
b4a86157a5
commit
10a8f01fad
|
@ -1,5 +1,5 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use lemmy_db_views::structs::TaglineView;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
#[cfg(feature = "full")]
|
||||
use ts_rs::TS;
|
||||
|
|
|
@ -12,7 +12,6 @@ pub async fn list_custom_emojis(
|
|||
local_user_view: Option<LocalUserView>,
|
||||
context: Data<LemmyContext>,
|
||||
) -> Result<Json<ListCustomEmojisResponse>, LemmyError> {
|
||||
|
||||
let local_site = SiteView::read_local(&mut context.pool()).await?;
|
||||
let custom_emojis = CustomEmojiView::list(
|
||||
&mut context.pool(),
|
||||
|
|
|
@ -3,7 +3,7 @@ use lemmy_api_common::{
|
|||
context::LemmyContext,
|
||||
tagline::{ListTaglines, ListTaglinesResponse},
|
||||
};
|
||||
use lemmy_db_views::structs::{TaglineView, LocalUserView, SiteView};
|
||||
use lemmy_db_views::structs::{LocalUserView, SiteView, TaglineView};
|
||||
use lemmy_utils::error::LemmyError;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
@ -12,7 +12,6 @@ pub async fn list_taglines(
|
|||
local_user_view: Option<LocalUserView>,
|
||||
context: Data<LemmyContext>,
|
||||
) -> Result<Json<ListTaglinesResponse>, LemmyError> {
|
||||
|
||||
let local_site = SiteView::read_local(&mut context.pool()).await?;
|
||||
let taglines = TaglineView::list(
|
||||
&mut context.pool(),
|
||||
|
|
|
@ -21,8 +21,8 @@ pub mod private_message_view;
|
|||
pub mod registration_application_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod site_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod tagline_view;
|
||||
pub mod structs;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod tagline_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod vote_view;
|
||||
|
|
|
@ -9,7 +9,6 @@ use lemmy_db_schema::{
|
|||
};
|
||||
|
||||
impl TaglineView {
|
||||
|
||||
pub async fn list(
|
||||
pool: &mut DbPool<'_>,
|
||||
for_local_site_id: LocalSiteId,
|
||||
|
@ -30,10 +29,10 @@ impl TaglineView {
|
|||
let mut result = Vec::new();
|
||||
for tagline in &taglines {
|
||||
result.push(TaglineView {
|
||||
tagline: tagline.clone()
|
||||
tagline: tagline.clone(),
|
||||
});
|
||||
}
|
||||
|
||||
Ok(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ use lemmy_api_crud::{
|
|||
create::create_custom_emoji,
|
||||
delete::delete_custom_emoji,
|
||||
list::list_custom_emojis,
|
||||
update::update_custom_emoji
|
||||
update::update_custom_emoji,
|
||||
},
|
||||
post::{
|
||||
create::create_post,
|
||||
|
@ -369,8 +369,8 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimitCell) {
|
|||
.service(
|
||||
web::scope("/tagline")
|
||||
.wrap(rate_limit.message())
|
||||
.route("/list", web::get().to(list_taglines))
|
||||
)
|
||||
.route("/list", web::get().to(list_taglines)),
|
||||
),
|
||||
);
|
||||
cfg.service(
|
||||
web::scope("/sitemap.xml")
|
||||
|
|
Loading…
Reference in a new issue