Add auth to delete endpoints

This commit is contained in:
2020-07-30 01:09:29 -04:00
parent 79b45551fd
commit 68b04b4f4c
10 changed files with 136 additions and 25 deletions

View File

@@ -56,6 +56,7 @@ pub fn delete_shop(
) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
warp::path::param()
.and(warp::delete())
.and(warp::header::optional("api-key"))
.and(with_env(env))
.and_then(handlers::delete_shop)
}
@@ -91,6 +92,7 @@ pub fn delete_owner(
) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
warp::path::param()
.and(warp::delete())
.and(warp::header::optional("api-key"))
.and(with_env(env))
.and_then(handlers::delete_owner)
}
@@ -127,6 +129,7 @@ pub fn delete_interior_ref_list(
) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
warp::path::param()
.and(warp::delete())
.and(warp::header::optional("api-key"))
.and(with_env(env))
.and_then(handlers::delete_interior_ref_list)
}