summaryrefslogtreecommitdiff
path: root/bucky/app/api.js
diff options
context:
space:
mode:
authorjulian laplace <julescarbon@gmail.com>2022-10-26 17:05:14 +0200
committerjulian laplace <julescarbon@gmail.com>2022-10-26 17:05:14 +0200
commitdd72ab05da17309fd5ee6005cdc1fae686b5fa9e (patch)
tree9edc695fffa73a85d94e571f44c7d4c97de71654 /bucky/app/api.js
parent3de2a5872fd0481568e918a1ea798b3f75ace610 (diff)
filter by keyword, thread, or username
Diffstat (limited to 'bucky/app/api.js')
-rw-r--r--bucky/app/api.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/bucky/app/api.js b/bucky/app/api.js
index a2f85d0..0645145 100644
--- a/bucky/app/api.js
+++ b/bucky/app/api.js
@@ -120,6 +120,7 @@ function route(app) {
bucky.checkMail,
function (req, res) {
res.json({
+ query: res.query,
threads: res.threads,
files: res.files,
comments: res.comments,
@@ -138,6 +139,16 @@ function route(app) {
res.json({ keyword: res.keyword });
}
);
+
+ app.post(
+ "/api/keyword/new",
+ bucky.ensureLastlog,
+ middleware.ensureAuthenticated,
+ bucky.createKeyword,
+ function (req, res) {
+ res.json({ keyword: res.keyword });
+ }
+ );
app.get(
"/api/keyword/:keyword",
bucky.ensureLastlog,