We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cef19a6 commit 1a5778fCopy full SHA for 1a5778f
server/route/matelight.js
@@ -1,14 +1,15 @@
1
require('isomorphic-fetch');
2
3
module.exports = (router) => {
4
- router.get('/matelight/:command', async (ctx) => {
+ router.post('/matelight/:command', async (ctx) => {
5
const { command } = ctx.params;
6
const res = await fetch(`http://matelight.cbrp3.c-base.org/api/${command}`);
7
ctx.assert((res.status === 200), res.status);
8
const body = await res.json();
9
ctx.body = body;
10
});
11
- router.get('/matelight/:command/:argument', async (ctx) => {
+ router.post('/matelight/:command/:argument', async (ctx) => {
12
+ console.log(ctx)
13
const { command, argument } = ctx.params;
14
const res = await fetch(`http://matelight.cbrp3.c-base.org/api/${command}/${argument}`);
15
0 commit comments