view analytics
This commit is contained in:
7
index.js
7
index.js
@ -193,6 +193,13 @@ app.post("/api/analytics/game", async (req, res) => {
|
||||
return;
|
||||
})
|
||||
|
||||
app.use("/api/analytics/get", async(req, res) => {
|
||||
const query = top.prepare(`SELECT * FROM stats ORDER BY plays DESC`);
|
||||
let data = query.all();
|
||||
res.send(data);
|
||||
return;
|
||||
})
|
||||
|
||||
app.post("/api/ai/sendMessage", async (req, res) => {
|
||||
// take in chat id and message
|
||||
// stream back reply
|
||||
|
||||
Reference in New Issue
Block a user