refactor: Use PublicKey and Signature as parameters #33

Manually merged
awiteb merged 9 commits from awiteb/public-key_and_siganture_as_parameters into master 2024-07-28 11:56:46 +02:00 AGit
Showing only changes of commit 531e27ab2c - Show all commits

View file

@ -45,7 +45,7 @@ use crate::{
(status_code = 500, description = "Internal server error", content_type = "application/json", body = MessageSchema),
),
parameters(
("X-OTMP-SIGNATURE" = Signature, Header, description = "Signature of the request"),
Signature,
("X-OTMP-PUBLIC" = PublicKey, Header, description = "Public key of the sender"),
),
)]
@ -80,7 +80,7 @@ pub async fn register(req: &Request, depot: &mut Depot) -> ApiResult<EmptySchema
),
parameters(
("X-OTMP-PUBLIC" = PublicKey, Header, description = "Public key of the sender"),
("X-OTMP-SIGNATURE" = Signature, Header, description = "Signature of the request"),
Signature,
),
)]
async fn user_whitelist(
@ -119,7 +119,7 @@ async fn user_whitelist(
),
parameters(
("X-OTMP-PUBLIC" = PublicKey, Header, description = "Public key of the sender"),
("X-OTMP-SIGNATURE" = Signature, Header, description = "Signature of the request"),
Signature,
),
)]
async fn user_blacklist(