From 53451e67c7fe83648cac8170be2f4aafe6306809 Mon Sep 17 00:00:00 2001 From: BAaboe Date: Mon, 4 Aug 2025 20:52:19 +0200 Subject: [PATCH] fix: 4 is always bigger than 0 --- src/objects/me.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objects/me.rs b/src/objects/me.rs index e76802c..0c54570 100644 --- a/src/objects/me.rs +++ b/src/objects/me.rs @@ -1,4 +1,4 @@ -use axum::{body::Bytes, http::StatusCode}; +use axum::body::Bytes; use diesel::{ ExpressionMethods, QueryDsl, Queryable, Selectable, SelectableHelper, delete, insert_into, update, @@ -284,7 +284,7 @@ impl Me { cache_pool: &redis::Client, new_status: i16, ) -> Result<(), Error> { - if new_status > 4 && new_status < 0 { + if new_status > 4 || new_status < 0 { return Err(Error::BadRequest("Invalid status code".to_string())); } self.online_status = new_status;