Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zrll12 committed Mar 27, 2024
1 parent 8ae5f5d commit 67455b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/service/share/create.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::cmp::min;

use axum::http::HeaderMap;
use axum::Json;
use chrono::{Days, Utc};
Expand Down Expand Up @@ -31,8 +29,8 @@ pub async fn create_share(headers: HeaderMap, Json(body): Json<CreateShareReques
}).max().unwrap_or_else(|| LevelInfo::get_free_level());
let max_level = level.level.get_max_share_level();
let share_level = body.mode as u8;
if share_level > max_level as u8 {

if share_level > max_level as u8 {
return Err(ErrorMessage::PermissionDenied);
}
let password = match body.password {
Expand Down

0 comments on commit 67455b9

Please sign in to comment.