File tree 2 files changed +24
-23
lines changed
src/clj/athens/self_hosted/web
2 files changed +24
-23
lines changed Original file line number Diff line number Diff line change 1
1
{; ; :password "SuchWow"
2
2
; ; :in-memory? true
3
- :fluree {:servers [" http://localhost:8090" ]}
4
- :datascript {:persist-base-path " ./athens-data/datascript/persist/" }
5
- :nrepl {:port 8877 }}
3
+ :fluree {:servers [" http://localhost:8090" ]}
4
+ :datascript {:persist-base-path " ./athens-data/datascript/persist/" }
5
+ :nrepl {:port 8877 }
6
+ :feature-flags {:api true }}
Original file line number Diff line number Diff line change 103
103
(defn make-routes
104
104
[datascript fluree config]
105
105
(let [conn (:conn datascript)
106
- ; ; TODO: only if config ff is on
107
106
; ; TODO: handle pw
108
107
; ; password (-> config :config :password)
109
108
]
110
-
111
- (->
112
- (c/routes
109
+ (if-not (-> config :config :feature-flags :api )
110
+ (c/routes )
111
+ (->
112
+ (c/routes
113
113
(c/context
114
- " /api/path" []
115
-
116
- (c/POST
117
- " /read" {{:keys [path]} :body-params }
118
- (->> path
119
- (read-path conn)
120
- ok))
121
-
122
- (c/POST
123
- " /write" {{:keys [path relation data]} :body-params }
124
- (->> (write-in-path-evt conn path relation data)
125
- (process-event! datascript fluree config)
126
- (ret-first path)
127
- (read-path conn)
128
- ok))))
129
- muuntaja.mw/wrap-format)))
114
+ " /api/path" []
115
+
116
+ (c/POST
117
+ " /read" {{:keys [path]} :body-params }
118
+ (->> path
119
+ (read-path conn)
120
+ ok))
121
+
122
+ (c/POST
123
+ " /write" {{:keys [path relation data]} :body-params }
124
+ (->> (write-in-path-evt conn path relation data)
125
+ (process-event! datascript fluree config)
126
+ (ret-first path)
127
+ (read-path conn)
128
+ ok))))
129
+ muuntaja.mw/wrap-format) )))
130
130
131
131
132
132
; ; curl examples
You can’t perform that action at this time.
0 commit comments