Commit 3f45004a authored by Yoann HOUPERT's avatar Yoann HOUPERT

Merge branch '69-change-rest-api-to-be-more-hateoas-compliant' into 'master'

rename path api

Closes #69

See merge request !47
parents 2b9e4324 0c187798
Pipeline #5149 passed with stage
in 54 seconds
......@@ -23,7 +23,7 @@ const routesFactory = controllerFactory => {
const controller = controllerFactory;
routes.put('/connect/:room', (req, res) => {
routes.put('/rooms/:room', (req, res) => {
const result = controller.client(req.params.room);
if (result) {
res.status(201).json({message: 'Room ' + req.params.room + ' created'});
......@@ -32,7 +32,7 @@ const routesFactory = controllerFactory => {
}
});
routes.delete('/disconnect/:room', (req, res) => {
routes.delete('/rooms/:room', (req, res) => {
const result = controller.forceDisconnect(req.params.room);
if (result) {
res.status(200).json({message: 'Room ' + req.params.room + ' deleted'});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment