Rohan Sircar
4 years ago
10 changed files with 180 additions and 84 deletions
-
45Cargo.lock
-
3Cargo.toml
-
1rustfmt.toml
-
41src/actions/users.rs
-
52src/errors/domain_error.rs
-
15src/main.rs
-
14src/models/errors.rs
-
5src/models/users.rs
-
67src/routes/auth.rs
-
21src/routes/users.rs
@ -0,0 +1 @@ |
|||
max_width = 80 |
@ -1,13 +1,13 @@ |
|||
use serde::Serialize;
|
|||
|
|||
#[derive(Debug, Clone, Serialize)]
|
|||
pub struct JsonErrorModel {
|
|||
#[derive(Debug, Clone, Serialize, new)]
|
|||
pub struct JsonErrorModel<'a> {
|
|||
status_code: i16,
|
|||
pub line: String,
|
|||
pub reason: String,
|
|||
pub reason: &'a str,
|
|||
}
|
|||
#[derive(Debug, Clone, Serialize)]
|
|||
pub struct ErrorModel {
|
|||
pub status_code: i16,
|
|||
pub reason: String,
|
|||
#[derive(Debug, Clone, Serialize, new)]
|
|||
pub struct ErrorModel<'a> {
|
|||
pub error_code: i16,
|
|||
pub reason: &'a str,
|
|||
}
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue