From e333a779338ff8bccdc4225fc953d6f4f0226db0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 12 Sep 2016 22:59:03 -0400 Subject: add proof of work to countobjects In this case, an empty string is hashed to generate the PoW. --- HTTP.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'HTTP.hs') diff --git a/HTTP.hs b/HTTP.hs index 702a806..e5e4d85 100644 --- a/HTTP.hs +++ b/HTTP.hs @@ -36,8 +36,8 @@ type HttpAPI = :<|> "keysafe" :> V1 :> "objects" :> ObjectIdent :> POWParam :> ReqBody '[OctetStream] StorableObject :> Put '[JSON] (POWGuarded StoreResult) - :<|> "keysafe" :> V1 :> "stats" :> "countobjects" - :> Get '[JSON] CountResult + :<|> "keysafe" :> V1 :> "stats" :> "countobjects" :> POWParam + :> Get '[JSON] (POWGuarded CountResult) type V1 = "v1" -- cgit v1.2.3