Skip to content
Snippets Groups Projects
Commit 319cd6a6 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

test chat

parent 4fbaeea7
No related branches found
No related tags found
No related merge requests found
...@@ -247,9 +247,13 @@ app.get('/ping', (req,res) => { ...@@ -247,9 +247,13 @@ app.get('/ping', (req,res) => {
res.send("Pong!") res.send("Pong!")
}) })
app.get('/channels/:id', (req,res) => { app.get('/channels/:id', (req,res) => {
const id = req.params.id; var id = req.params.id;
res.send(client.channels.cache.get(id)); res.send(client.channels.cache.get(id));
}) })
app.get('/mc/chat/:detail', (req,res) => {
var detail = JSON.parse(decodeURI(req.params.detail));
res.send(detail.test);
})
app.listen(27001, () => { app.listen(27001, () => {
console.log('['+'INFO'.yellow+'] Écoute sur '.brightWhite+'node.sl-projects.com:27001'.yellow); console.log('['+'INFO'.yellow+'] Écoute sur '.brightWhite+'node.sl-projects.com:27001'.yellow);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment