aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-03-27 12:05:18 +0300
committerBonfaceKilz2024-03-27 17:59:06 +0300
commit784109160ba173eea7ae148ed7d906fcdb79bf8e (patch)
tree5b74ad83099ae2c5e8518a75d57b8f333ea1cbc4 /gn2
parent9699233b9006b3b5d61a75923c5043858a3b1d42 (diff)
downloadgenenetwork2-784109160ba173eea7ae148ed7d906fcdb79bf8e.tar.gz
Require ouath2 for gnqa history search.
* gn2/wqflask/views.py (gnqna_hist): Add "require_oauth2" decorator. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com> Co-authored-by: Alexander Kabui <alexanderkabua@gmail.com>
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/views.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py
index 81d73433..47233099 100644
--- a/gn2/wqflask/views.py
+++ b/gn2/wqflask/views.py
@@ -300,9 +300,8 @@ def gnqna():
@app.route("/gnqna/hist/search/<search_term>", methods=["GET"])
+@require_oauth2
def gnqna_hist(search_term):
-
- # todo add token validation
response = monad_requests.get(urljoin(GN3_LOCAL_URL, f"/api/llm/historys/{search_term}")).then(lambda resp: resp).either(
lambda x: x.json(), lambda x: x.json())
return render_template("gnqa_answer.html", **{"gn_server_url": GN3_LOCAL_URL, **response})