mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-10 12:05:57 +00:00
wip
This commit is contained in:
parent
2ec8cd3a52
commit
961c7f1fcb
3 changed files with 11 additions and 0 deletions
|
@ -71,6 +71,7 @@
|
|||
# TODO: Unfortunately pictrs can only resize images to fit in a*a square, no rectangle.
|
||||
# Otherwise we have to use crop, or use max_width/max_height which throws error
|
||||
# if image is larger.
|
||||
# TODO: whats a sensible default here?
|
||||
max_banner_size: 512
|
||||
# Prevent users from uploading images for posts or embedding in markdown. Avatars, icons and
|
||||
# banners can still be uploaded.
|
||||
|
|
|
@ -9,6 +9,15 @@ pub mod download;
|
|||
pub mod upload;
|
||||
mod utils;
|
||||
|
||||
pub async fn delete_community_icon(
|
||||
data: Json<DeleteImageParams>,
|
||||
context: Data<LemmyContext>,
|
||||
local_user_view: LocalUserView,
|
||||
) -> LemmyResult<Json<SuccessResponse>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
// TODO: get rid of delete tokens and allow deletion by admin or uploader
|
||||
pub async fn delete_image(
|
||||
data: Json<DeleteImageParams>,
|
||||
context: Data<LemmyContext>,
|
||||
|
|
|
@ -207,6 +207,7 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) {
|
|||
.route("/ban_user", post().to(ban_from_community))
|
||||
.route("/mod", post().to(add_mod_to_community))
|
||||
.route("/icon", post().to(upload_community_icon))
|
||||
.route("/icon", delete().to(delete_community_icon))
|
||||
.route("/banner", post().to(upload_community_banner))
|
||||
.service(
|
||||
scope("/pending_follows")
|
||||
|
|
Loading…
Reference in a new issue