Added apis

This commit is contained in:
2022-10-04 11:06:48 +02:00
parent 6234cf18e8
commit ae74f66c3a
28 changed files with 392 additions and 300 deletions

View File

@@ -20,12 +20,12 @@ pub struct ServiceRegister {
}
impl ServiceRegister {
pub fn new(_pool: ConnectionPool, _config: AppConfig) -> Self {
pub fn new(pool: ConnectionPool, _config: Arc<AppConfig>) -> Self {
info!("creating services");
let item_service = Arc::new(DefaultItemService::new()) as DynItemService;
let project_service = Arc::new(DefaultProjectService::new()) as DynProjectService;
let user_service = Arc::new(DefaultUserService::new()) as DynUserService;
let user_service = Arc::new(DefaultUserService::new(pool.clone())) as DynUserService;
info!("services created succesfully");