Skip to content

Commit 1a5778f

Browse files
committed
Change to post
1 parent cef19a6 commit 1a5778f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/route/matelight.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
require('isomorphic-fetch');
22

33
module.exports = (router) => {
4-
router.get('/matelight/:command', async (ctx) => {
4+
router.post('/matelight/:command', async (ctx) => {
55
const { command } = ctx.params;
66
const res = await fetch(`http://matelight.cbrp3.c-base.org/api/${command}`);
77
ctx.assert((res.status === 200), res.status);
88
const body = await res.json();
99
ctx.body = body;
1010
});
11-
router.get('/matelight/:command/:argument', async (ctx) => {
11+
router.post('/matelight/:command/:argument', async (ctx) => {
12+
console.log(ctx)
1213
const { command, argument } = ctx.params;
1314
const res = await fetch(`http://matelight.cbrp3.c-base.org/api/${command}/${argument}`);
1415
ctx.assert((res.status === 200), res.status);

0 commit comments

Comments
 (0)