chore: Use Signature as a openAPI parameter

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-07-27 02:46:03 +03:00
parent 1d0268c501
commit 531e27ab2c
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -45,7 +45,7 @@ use crate::{
(status_code = 500, description = "Internal server error", content_type = "application/json", body = MessageSchema), (status_code = 500, description = "Internal server error", content_type = "application/json", body = MessageSchema),
), ),
parameters( parameters(
("X-OTMP-SIGNATURE" = Signature, Header, description = "Signature of the request"), Signature,
("X-OTMP-PUBLIC" = PublicKey, Header, description = "Public key of the sender"), ("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( parameters(
("X-OTMP-PUBLIC" = PublicKey, Header, description = "Public key of the sender"), ("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( async fn user_whitelist(
@ -119,7 +119,7 @@ async fn user_whitelist(
), ),
parameters( parameters(
("X-OTMP-PUBLIC" = PublicKey, Header, description = "Public key of the sender"), ("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( async fn user_blacklist(