<commit_before>(ns metabase.api.routes
  (:require [compojure.core :refer [context defroutes]]
            [compojure.route :as route]
            (metabase.api [annotation :as annotation]
                          [card :as card]
                          [dash :as dash]
                          [emailreport :as emailreport]
                          [org :as org]
                          [qs :as qs]
                          [query :as query]
                          [result :as result]
                          [search :as search]
                          [session :as session]
                          [user :as user])
            (metabase.api.meta [dataset :as dataset]
                               [db :as db]
                               [field :as field]
                               [table :as table])
            [metabase.middleware.auth :as auth]))

(defroutes routes
  (context "/annotation"   [] (-> annotation/routes auth/bind-current-user auth/enforce-authentication))
  (context "/card"         [] (-> card/routes auth/bind-current-user auth/enforce-authentication))
  (context "/dash"         [] (-> dash/routes auth/bind-current-user auth/enforce-authentication))
  (context "/emailreport"  [] (-> emailreport/routes auth/bind-current-user auth/enforce-authentication))
  (context "/meta/dataset" [] (-> dataset/routes auth/bind-current-user auth/enforce-authentication))
  (context "/meta/db"      [] (-> db/routes auth/bind-current-user auth/enforce-authentication))
  (context "/meta/field"   [] (-> field/routes auth/bind-current-user auth/enforce-authentication))
  (context "/meta/table"   [] (-> table/routes auth/bind-current-user auth/enforce-authentication))
  (context "/org"          [] (-> org/routes auth/bind-current-user auth/enforce-authentication))
  (context "/qs"           [] (-> qs/routes auth/bind-current-user auth/enforce-authentication))
  (context "/query"        [] (-> query/routes auth/bind-current-user auth/enforce-authentication))
  (context "/result"       [] (-> result/routes auth/bind-current-user auth/enforce-authentication))
  (context "/search"       [] (-> search/routes auth/bind-current-user auth/enforce-authentication))
  (context "/session"      [] session/routes)<commit_msg>implement /api/health url.<commit_after>(ns metabase.api.routes
  (:require [compojure.core :refer [context defroutes GET]]
            [compojure.route :as route]
            (metabase.api [annotation :as annotation]
                          [card :as card]
                          [dash :as dash]
                          [emailreport :as emailreport]
                          [org :as org]
                          [qs :as qs]
                          [query :as query]
                          [result :as result]
                          [search :as search]
                          [session :as session]
                          [user :as user])
            (metabase.api.meta [dataset :as dataset]
                               [db :as db]
                               [field :as field]
                               [table :as table])
            [metabase.middleware.auth :as auth]))

(defroutes routes
  (context "/annotation"   [] (-> annotation/routes auth/bind-current-user auth/enforce-authentication))
  (context "/card"         [] (-> card/routes auth/bind-current-user auth/enforce-authentication))
  (context "/dash"         [] (-> dash/routes auth/bind-current-user auth/enforce-authentication))
  (context "/emailreport"  [] (-> emailreport/routes auth/bind-current-user auth/enforce-authentication))
  (GET     "/health"       [] {:status 200 :body {:status "ok"}})
  (context "/meta/dataset" [] (-> dataset/routes auth/bind-current-user auth/enforce-authentication))
  (context "/meta/db"      [] (-> db/routes auth/bind-current-user auth/enforce-authentication))
  (context "/meta/field"   [] (-> field/routes auth/bind-current-user auth/enforce-authentication))
  (context "/meta/table"   [] (-> table/routes auth/bind-current-user auth/enforce-authentication))
  (context "/org"          [] (-> org/routes auth/bind-current-user auth/enforce-authentication))
  (context "/qs"           [] (-> qs/routes auth/bind-current-user auth/enforce-authentication))
  (context "/query"        [] (-> query/routes auth/bind-current-user auth/enforce-authentication))
  (context "/result"       [] (-> result/routes auth/bind-current-user auth/enforce-authentication))
  (context "/search"       [] (-> search/routes auth/bind-current-user auth/enforce-authentication))
  (context "/session"      [] session/routes)
{'fraction_non_alphanumeric': 0.13925700630023896, 'fraction_numerical': 0.000651748859439496, 'mean_word_length': 1.9065656565656566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1753569', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1289, 'n_words': 269}