Skip to content

Commit a4da475

Browse files
committed
handlers: typo
1 parent 87389ca commit a4da475

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎content/en/labs/a1.building-a-containerized-restful-api.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ rest_api_workspace
101101
│ │ │ │ ├── mod.rs
102102
│ │ │ │ ├── book
103103
│ │ │ │ │ ├── mod.rs
104-
│ │ │ │ │ ├── handler.rs
104+
│ │ │ │ │ ├── handlers.rs
105105
│ │ │ │ │ └── payload.rs
106106
│ │ │ │ └── shared
107107
│ │ │ │ ├── mod.rs

‎content/en/labs/a5.routes-and-error-responses.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ pub struct AppState {
190190
191191
### Add Initial Handlers
192192

193-
Add a new file `book_service/src/app/book/handler.rs`.
193+
Add a new file `book_service/src/app/book/handlers.rs`.
194194

195195
```rust
196196
use axum::{
@@ -307,7 +307,7 @@ pub async fn delete(
307307
Update `book_service/src/app/book/mod.rs`.
308308

309309
```rust
310-
mod handler;
310+
mod handlers;
311311
mod payload;
312312

313313
use axum::{Router, routing::get};
@@ -316,8 +316,8 @@ use crate::state::AppState;
316316

317317
pub fn router() -> Router<AppState> {
318318
Router::new()
319-
.route("/", get(handler::list).post(handler::create))
320-
.route("/{id}", get(handler::read).put(handler::update).delete(handler::delete))
319+
.route("/", get(handlers::list).post(handlers::create))
320+
.route("/{id}", get(handlers::read).put(handlers::update).delete(handlers::delete))
321321
}
322322
```
323323

@@ -390,9 +390,9 @@ pub use pagination::Pagination;
390390

391391
Add `pub mod shared;` to `book_service/src/app/mod.rs`.
392392

393-
### Attach it to Handler
393+
### Attach it to Handlers
394394

395-
Update `book_service/src/app/book/handler.rs`.
395+
Update `book_service/src/app/book/handlers.rs`.
396396

397397
```rust
398398
use axum::{

‎content/en/labs/a6.form-validation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub use validation::{ValidatedJson, ValidationErrorResponse};
136136

137137
### Use New Extractor on Handlers
138138

139-
Update `book_service/src/app/book/handler.rs`.
139+
Update `book_service/src/app/book/handlers.rs`.
140140

141141
```rust
142142
// ...

‎content/en/labs/a7.openapi-specification.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub struct Pagination {
188188

189189
### Update Handlers
190190

191-
Update `book_service/src/app/book/handler.rs`.
191+
Update `book_service/src/app/book/handlers.rs`.
192192

193193
```rust
194194
// ...
@@ -291,7 +291,7 @@ use utoipa::OpenApi;
291291

292292
#[derive(OpenApi)]
293293
#[openapi(
294-
paths(handler::list, handler::create, handler::read, handler::update, handler::delete),
294+
paths(handlers::list, handlers::create, handlers::read, handlers::update, handlers::delete),
295295
components(schemas(payload::BookRequest))
296296
)]
297297
pub struct BookApi;

0 commit comments

Comments
 (0)