chore: comment out so i dont get warns compiling

This commit is contained in:
əlemi 2024-05-11 22:54:41 +02:00
parent bcf4b32dba
commit 18f712194c
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -42,37 +42,37 @@ pub async fn view(
}
}
pub struct StatusesQuery {
/// All results returned will be lesser than this ID. In effect, sets an upper bound on results.
pub max_id: String,
/// All results returned will be greater than this ID. In effect, sets a lower bound on results.
pub since_id: String,
/// Returns results immediately newer than this ID. In effect, sets a cursor at this ID and paginates forward.
pub min_id: String,
/// Maximum number of results to return. Defaults to 20 statuses. Max 40 statuses.
pub limit: i32,
/// Filter out statuses without attachments.
pub only_media: bool,
/// Filter out statuses in reply to a different account.
pub exclude_replies: bool,
/// Filter out boosts from the response.
pub exclude_reblogs: bool,
/// Filter for pinned statuses only. Defaults to false, which includes all statuses. Pinned statuses do not receive special priority in the order of the returned results.
pub pinned: bool,
/// Filter for statuses using a specific hashtag.
pub tagged: String,
}
pub async fn statuses(
State(ctx): State<Context>,
AuthIdentity(auth): AuthIdentity,
Path(id): Path<String>,
Query(_query): Query<StatusesQuery>,
) -> Result<Json<Vec<Status>>, StatusCode> {
let uid = ctx.uid(id);
model::addressing::Entity::find_addressed(auth.my_id())
.filter(model::activity::Column::Actor.eq(uid))
.filter(auth.filter_condition());
todo!()
}
// pub struct StatusesQuery {
// /// All results returned will be lesser than this ID. In effect, sets an upper bound on results.
// pub max_id: String,
// /// All results returned will be greater than this ID. In effect, sets a lower bound on results.
// pub since_id: String,
// /// Returns results immediately newer than this ID. In effect, sets a cursor at this ID and paginates forward.
// pub min_id: String,
// /// Maximum number of results to return. Defaults to 20 statuses. Max 40 statuses.
// pub limit: i32,
// /// Filter out statuses without attachments.
// pub only_media: bool,
// /// Filter out statuses in reply to a different account.
// pub exclude_replies: bool,
// /// Filter out boosts from the response.
// pub exclude_reblogs: bool,
// /// Filter for pinned statuses only. Defaults to false, which includes all statuses. Pinned statuses do not receive special priority in the order of the returned results.
// pub pinned: bool,
// /// Filter for statuses using a specific hashtag.
// pub tagged: String,
// }
//
// pub async fn statuses(
// State(ctx): State<Context>,
// AuthIdentity(auth): AuthIdentity,
// Path(id): Path<String>,
// Query(_query): Query<StatusesQuery>,
// ) -> Result<Json<Vec<Status>>, StatusCode> {
// let uid = ctx.uid(id);
// model::addressing::Entity::find_addressed(auth.my_id())
// .filter(model::activity::Column::Actor.eq(uid))
// .filter(auth.filter_condition());
//
// todo!()
// }