mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
Add ability to name a handler function as 'config' (#1290)
* eliminate handler naming restrictions #1277 * Update actix-web-codegen/CHANGES.md Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
This commit is contained in:
committed by
Yuki Okushi
parent
8888520d83
commit
71d11644a7
@ -2,6 +2,12 @@ use actix_web::{http, test, web::Path, App, HttpResponse, Responder};
|
||||
use actix_web_codegen::{connect, delete, get, head, options, patch, post, put, trace};
|
||||
use futures::{future, Future};
|
||||
|
||||
// Make sure that we can name function as 'config'
|
||||
#[get("/config")]
|
||||
async fn config() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
}
|
||||
|
||||
#[get("/test")]
|
||||
async fn test_handler() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
|
Reference in New Issue
Block a user