This commit is contained in:
eraden 2022-05-20 19:47:19 +02:00
parent c11c8f24f1
commit 9882b575de
8 changed files with 7 additions and 8 deletions

View File

@ -14,6 +14,7 @@ members = [
"actors/search_manager",
"actors/token_manager",
"actors/fs_manager",
"actors/lang_provider",
# artifacts
"db-seed",
"api",

View File

@ -14,8 +14,5 @@ actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
log = { version = "0.4", features = [] }
pretty_env_logger = { version = "0.4", features = [] }

View File

@ -14,6 +14,8 @@ actix-rt = { version = "2.7", features = [] }
thiserror = { version = "1.0.31" }
serde = { version = "1.0.137", features = ["derive"] }
uuid = { version = "0.8", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }

View File

@ -4,6 +4,7 @@ use std::collections::HashSet;
use database_manager::{query_db, Database};
use model::{PaymentMethod, ShoppingCartId};
use serde::Serialize;
#[macro_export]
macro_rules! cart_async_handler {
@ -55,7 +56,8 @@ macro_rules! query_cart {
};
}
#[derive(Debug, thiserror::Error)]
#[derive(Debug, thiserror::Error, Serialize)]
#[serde(rename_all = "kebab-case")]
pub enum Error {
#[error("System can't ensure shopping cart existence")]
ShoppingCartFailed,
@ -69,10 +71,6 @@ pub enum Error {
Db(#[from] database_manager::Error),
#[error("Unable to update cart item")]
UpdateFailed,
#[error("Failed to change quantity")]
ChangeQuantity,
#[error("Shopping cart item {0} does not exists")]
NotExists(model::ShoppingCartItemId),
}
pub type Result<T> = std::result::Result<T, Error>;

View File

View File

View File

@ -0,0 +1 @@
pub struct LangProvider;