Add function and prefer .iter()
This commit is contained in:
parent
53c6fcd917
commit
e3adc35221
12 changed files with 117 additions and 67 deletions
src/db
|
@ -1,5 +1,5 @@
|
|||
use actix_web::HttpResponse;
|
||||
use actix_web::http::StatusCode;
|
||||
use actix_web::HttpResponse;
|
||||
use serde::ser::SerializeStruct;
|
||||
use serde::{Serialize, Serializer};
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl DatabaseError {
|
|||
match self {
|
||||
DatabaseError::NotFound => StatusCode::NOT_FOUND,
|
||||
DatabaseError::Protected => StatusCode::FORBIDDEN,
|
||||
_ => StatusCode::INTERNAL_SERVER_ERROR
|
||||
_ => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue