|
|
@ -47,8 +47,6 @@ router.get("/", (req, res) => {
|
|
|
|
router.get("/show-rooms", (req, res) => {
|
|
|
|
router.get("/show-rooms", (req, res) => {
|
|
|
|
validateValue(req.query, {
|
|
|
|
validateValue(req.query, {
|
|
|
|
hostname: [ required, isString, (string) => {
|
|
|
|
hostname: [ required, isString, (string) => {
|
|
|
|
console.log(string.length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.length === 0) {
|
|
|
|
if (string.length === 0) {
|
|
|
|
throw new ValidationError("May not be empty");
|
|
|
|
throw new ValidationError("May not be empty");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -69,8 +67,6 @@ router.get("/show-rooms", (req, res) => {
|
|
|
|
return bhttp.get(roomsUrl);
|
|
|
|
return bhttp.get(roomsUrl);
|
|
|
|
}).then((response) => {
|
|
|
|
}).then((response) => {
|
|
|
|
if (response.statusCode === 200) {
|
|
|
|
if (response.statusCode === 200) {
|
|
|
|
console.log(response.body);
|
|
|
|
|
|
|
|
// next_batch
|
|
|
|
|
|
|
|
res.render("rooms", {
|
|
|
|
res.render("rooms", {
|
|
|
|
rooms: response.body.chunk,
|
|
|
|
rooms: response.body.chunk,
|
|
|
|
nextBatchUrl: (response.body.next_batch != null)
|
|
|
|
nextBatchUrl: (response.body.next_batch != null)
|
|
|
|