Add basic register and login
All checks were successful
Build Crate / build (push) Successful in 1m45s
All checks were successful
Build Crate / build (push) Successful in 1m45s
This commit is contained in:
19
src/models/generic.rs
Normal file
19
src/models/generic.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub struct GenericResponse {
|
||||
pub status: String,
|
||||
}
|
||||
|
||||
impl GenericResponse {
|
||||
pub fn ok() -> Self {
|
||||
GenericResponse {
|
||||
status: String::new(),
|
||||
}
|
||||
}
|
||||
pub fn err(msg: &str) -> Self {
|
||||
GenericResponse {
|
||||
status: msg.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user