                   :times-solved 0
                   :description description
                   :tags (s/split tags #"\s+")
+                  :restricted (s/split restricted #"\s+")
                   :tests (s/split-lines code)
                   :user (if (empty? author) user author)
                   :approved false})

  (GET "/problems" [] (problem-page))
  (GET "/problem/:id" [id] (code-box id))
  (GET "/problems/submit" [] (problem-submission-page))
  (POST "/problems/submit" [prob-id author title tags description code]
    (create-problem title tags description code (when (not= "" prob-id) (Integer. prob-id)) author))
  (GET "/problems/unapproved" [] (unapproved-problems))
  (POST "/problem/edit" [id]
    (edit-problem (Integer. id)))

      (flash-error "You are not authorized to submit a problem." "/problems"))))

(defn edit-problem [id]
  (let [{:keys [title user tags restricted description tests]} (get-problem id)]
    (doseq [[k v] {:prob-id id
                   :author user
                   :title title
                   :tags (s/join " " tags)
                   :restricted (s/join " " restricted)
                   :description description
                   :tests (s/join "\n" tests)}]
      (session/flash-put! k v))
