mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2025-09-05 17:00:39 +00:00
#66 set minimum
This commit is contained in:
@@ -49,7 +49,7 @@ async fn create(note: web::Json<Note>) -> impl Responder {
|
||||
}
|
||||
match n.views {
|
||||
Some(v) => {
|
||||
if v > *config::MAX_VIEWS {
|
||||
if v > *config::MAX_VIEWS || v < 1 {
|
||||
return bad_req;
|
||||
}
|
||||
n.expiration = None; // views overrides expiration
|
||||
|
Reference in New Issue
Block a user