      :body    (str "Export is complete. Download at the Location url specified in the header (" url ")")}))
 
 (defn get-datadump-status-handler
-  [{:as darwin :keys [params postgres]} request]
-  (let [{:keys [filename zinvite]} params
-        zid (db/get-zid-from-zinvite postgres zinvite)]
+  [{:as darwin :keys [postgres]}
+   {:as request :keys [params]}]
+  (let [params (parsed-params darwin params)]
     (case (-> (get-export-status darwin params) (get "status"))
       ("pending" "started" "processing") (check-back-response darwin params 200)
       "complete"                         (complete-response darwin params)

  ([darwin filename]
   (let [expiration (-> darwin :config :export :expiry-days)]
     (generate-aws-url! darwin filename expiration))))


;; What follows is the guts of our responding and computing.





(defn get-datadump-handler
  "Main handler function; Attempts to return a datadump file within within a set amount of time, and if it can't, will
