 
 ;;; ------------------------------------------------------------ Favoriting ------------------------------------------------------------
 
-(defendpoint POST "/:id/favorite"
+(api/defendpoint POST "/:id/favorite"
   "Favorite a Dashboard."
   [id]
-  (check-not-archived (read-check Dashboard id))
-  (db/insert! DashboardFavorite :dashboard_id id, :user_id *current-user-id*))
-
-
-(defendpoint DELETE "/:id/favorite"
+  (api/check-not-archived (api/read-check Dashboard id))
+  (db/insert! DashboardFavorite :dashboard_id id, :user_id api/*current-user-id*))
+
+
+(api/defendpoint DELETE "/:id/favorite"
   "Unfavorite a Dashboard."
   [id]
-  (check-not-archived (read-check Dashboard id))
-  (let-404 [favorite-id (db/select-one-id DashboardFavorite :dashboard_id id, :user_id *current-user-id*)]
+  (api/check-not-archived (api/read-check Dashboard id))
+  (api/let-404 [favorite-id (db/select-one-id DashboardFavorite :dashboard_id id, :user_id api/*current-user-id*)]
     (db/delete! DashboardFavorite, :id favorite-id))
-  generic-204-no-content)
+  api/generic-204-no-content)
 
 
 ;;; ------------------------------------------------------------ Sharing is Caring ------------------------------------------------------------

            [metabase.models
             [card :refer [Card]]
             [dashboard :as dashboard :refer [Dashboard]]
             [dashboard-favorite :refer [DashboardFavorite]]
             [dashboard-card :refer [create-dashboard-card! DashboardCard delete-dashboard-card! update-dashboard-card!]]
             [interface :as mi]
             [revision :as revision]]
            [metabase.util.schema :as su]

  [dashboards]
  (let [favorite-dashboard-ids (when (seq dashboards)
                                 (db/select-field :dashboard_id DashboardFavorite
                                   :user_id      api/*current-user-id*
                                   :dashboard_id [:in (set (map u/get-id dashboards))]))]
    (for [dashboard dashboards]
      (assoc dashboard
