style: use better function names in server

This commit is contained in:
Radical 2025-05-12 17:18:55 +02:00
parent 8fdbf8cc48
commit b499ff1cf8
6 changed files with 16 additions and 16 deletions

View file

@ -12,7 +12,7 @@ struct RoleInfo {
}
#[get("{uuid}/roles")]
pub async fn response(req: HttpRequest, path: web::Path<(Uuid,)>, data: web::Data<Data>) -> Result<HttpResponse, Error> {
pub async fn get(req: HttpRequest, path: web::Path<(Uuid,)>, data: web::Data<Data>) -> Result<HttpResponse, Error> {
let headers = req.headers();
let auth_header = get_auth_header(headers);
@ -62,7 +62,7 @@ pub async fn response(req: HttpRequest, path: web::Path<(Uuid,)>, data: web::Dat
}
#[post("{uuid}/roles")]
pub async fn response_post(req: HttpRequest, role_info: web::Json<RoleInfo>, path: web::Path<(Uuid,)>, data: web::Data<Data>) -> Result<HttpResponse, Error> {
pub async fn create(req: HttpRequest, role_info: web::Json<RoleInfo>, path: web::Path<(Uuid,)>, data: web::Data<Data>) -> Result<HttpResponse, Error> {
let headers = req.headers();
let auth_header = get_auth_header(headers);