Skip to content

Commit

Permalink
Added /hue to base
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Stene committed Sep 20, 2017
1 parent e52f7bc commit 71b50d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ var internalip = "10.0.1.3"
var externalip = "84.208.132.246:9050"
var hueip = internalip

var serviceName = "/hue";

// Use this
var api = new HueApi(hueip, hueAPIkey);

Expand All @@ -29,7 +31,7 @@ var api = new HueApi(hueip, hueAPIkey);
/**
* GET all groups
*/
app.get('/hue/groups', function (request, response) {
app.get(serviceName+'/groups', function (request, response) {
console.log("GET all groups");
console.log(request.query);

Expand All @@ -49,7 +51,7 @@ app.get('/hue/groups', function (request, response) {
* id: 1
* }
*/
app.get('/hue/group', function (request, response) {
app.get(serviceName+'/group', function (request, response) {
console.log("GET single group");
console.log(request.query);

Expand All @@ -71,7 +73,7 @@ app.get('/hue/group', function (request, response) {
* brightness: 255
* }
*/
app.put('/hue/group', function (request, response) {
app.put(serviceName+'/group', function (request, response) {
console.log(request.query)

var id = request.query.id;
Expand Down

0 comments on commit 71b50d5

Please sign in to comment.