mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 09:47:50 +03:00
0.5.0
Возвращёна реализация сериализации в json для IResponse Добавлены типы для экстракции данных из запросов средствами actix-web Добавлен экстрактор для получения пользователя по токену доступа передаваемому в запросе Добавлен макрос для автоматической реализации ResponseError для ошибок экстракторов Добавлен эндпоинт users/me Из главного проекта исключена зависимость actix-http посредством переноса части тестового функционала в отдельный crate
This commit is contained in:
1
actix-test/.gitignore
vendored
Normal file
1
actix-test/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target
|
||||
1520
actix-test/Cargo.lock
generated
Normal file
1520
actix-test/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
actix-test/Cargo.toml
Normal file
8
actix-test/Cargo.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "actix-test"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
actix-http = "3.10.0"
|
||||
actix-web = "4.10.2"
|
||||
12
actix-test/src/lib.rs
Normal file
12
actix-test/src/lib.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use actix_web::dev::{HttpServiceFactory, Service, ServiceResponse};
|
||||
use actix_web::{App, test, web};
|
||||
|
||||
pub async fn test_app<F, A: 'static>(
|
||||
app_state: web::Data<A>,
|
||||
factory: F,
|
||||
) -> impl Service<actix_http::Request, Response = ServiceResponse, Error = actix_web::Error>
|
||||
where
|
||||
F: HttpServiceFactory + 'static,
|
||||
{
|
||||
test::init_service(App::new().app_data(app_state).service(factory)).await
|
||||
}
|
||||
Reference in New Issue
Block a user