                (reduce #(assoc %1 (:id %2) %2) {} moved-pls))))
     (log/info "Moving playlist" playlist-id dir)
     (write-playlists! db bucket playlists-key cache)
-    {:status 200})))
+    {:status 200}))
 
 (defn fetch-video-meta
   [id db metadata-bucket cache]

             (DELETE "/playlist/:id" request
                     (delete-playlist! request database public-bucket playlists-key cache))
             (PUT "/playlist/:id/up" request
                  (move-playlist! :up request database public-bucket playlists-key cache))
             (PUT "/playlist/:id/down" request
                  (move-playlist! :down request database public-bucket playlists-key cache))
             (POST "/video/:id/metadata" request
                   (save-video-meta! request database metadata-bucket cache))
             (GET  "/video/:id/metadata" [id]

    (swap! cache update :playlists dissoc playlist-id)
    (log/info "Deleteing playlist" playlist-id)
    (write-playlists! db bucket playlists-key cache)
    {:status 202}))

(defn move-playlist!
  [req dir db bucket playlists-key cache]
  (let [playlist-id (get-in req [:params :id])]
    (when (empty? (:playlists @cache))
      (swap! cache assoc :playlists (load-playlists! db bucket playlists-key)))
