fix: small changes

This commit is contained in:
əlemi 2023-01-20 16:38:33 +01:00
parent 600d23e580
commit 9a062cc7a8
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E
2 changed files with 3 additions and 7 deletions

View file

@ -57,7 +57,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let cfg = ConfigArgs::parse(); let cfg = ConfigArgs::parse();
let db = Database::connect("sqlite://./test.db").await?; let db = Database::connect(cfg.database.clone()).await?;
let store = Arc::new(Mutex::new(HashMap::new())); let store = Arc::new(Mutex::new(HashMap::new()));
let app = Router::new() let app = Router::new()

View file

@ -1,3 +1,5 @@
#![allow(non_snake_case)]
use uuid::Uuid; use uuid::Uuid;
use serde::{Serialize, Deserialize}; use serde::{Serialize, Deserialize};
@ -8,12 +10,6 @@ pub struct Error {
pub cause: String, pub cause: String,
} }
impl Error {
pub fn simple(msg: String) -> Error {
Error { error: msg.clone(), errorMessage: msg.clone(), cause: msg }
}
}
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct Agent { pub struct Agent {
pub name: String, pub name: String,