issue #1 console.log대신 에러의 경우, console.error로 변경.
This commit is contained in:
@@ -109,11 +109,12 @@ HotelTV.api = (function() {
|
||||
"put_order_roomservice": __apifxn_get_base_url() + "/api/" + _api_ver + "/assets/" + _dev_familly + "/" + _serial_num + "/requests/roomService/orders",
|
||||
/* Events */
|
||||
"update_event": __apifxn_get_base_url() + "/api/" + _api_ver + "/assets/" + _dev_familly + "/" + _serial_num + "/event",
|
||||
|
||||
/* Status */
|
||||
"set_device_status": __apifxn_get_base_url() + "/api/" + _api_ver + "/assets/" + _dev_familly + "/" + _serial_num + "/state",
|
||||
/*
|
||||
"get_emergency": __apifxn_get_base_url() + "/api/" + _api_ver + "/settops/" + _serial_num + "/emergency",
|
||||
"set_message_status": __apifxn_get_base_url() + "/api/" + _api_ver + "/settops/" + _serial_num + "/messages",
|
||||
"set_device_status": __apifxn_get_base_url() + "/api/" + _api_ver + "/settops/" + _serial_num + "/state",
|
||||
|
||||
"set_device_opmode": __apifxn_get_base_url() + "/api/" + _api_ver + "/settops/" + _serial_num + "/bbdoors/opmode",
|
||||
*/
|
||||
}
|
||||
@@ -215,7 +216,7 @@ HotelTV.api = (function() {
|
||||
__apifxn_init({ 'dev_familly': model, 'serial_num': serial, 'svr_ip': ip, 'svr_port': port, 'api_ver': HotelTV.state.token.version, "license": HotelTV.state.token.license, "apikey": HotelTV.state.token.apikey, "registered": HotelTV.state.token.registered, "exist": HotelTV.state.token.exist, "firstBoot": HotelTV.state.token.firstBoot });
|
||||
resolve(0);
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
}
|
||||
@@ -238,7 +239,7 @@ HotelTV.api = (function() {
|
||||
__apifxn_CallCmsApi("GET", dl_url, "DownloadData", null).then(_result => {
|
||||
resolve(_result.data);
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -257,7 +258,7 @@ HotelTV.api = (function() {
|
||||
__apifxn_CallCmsApi("GET", sz_api_url, "GetTranslation", null).then(_result => {
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -270,7 +271,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -283,7 +284,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -296,7 +297,7 @@ HotelTV.api = (function() {
|
||||
///console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -309,7 +310,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -322,7 +323,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -335,7 +336,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -347,7 +348,7 @@ HotelTV.api = (function() {
|
||||
__apifxn_CallCmsApi("GET", sz_api_url, "GetFlight", null).then(_result => {
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -360,7 +361,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -373,7 +374,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -386,7 +387,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -399,7 +400,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -417,7 +418,7 @@ HotelTV.api = (function() {
|
||||
resolve(null);
|
||||
}
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -434,7 +435,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -451,7 +452,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -468,7 +469,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -485,7 +486,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -501,7 +502,7 @@ HotelTV.api = (function() {
|
||||
__apifxn_CallCmsApi((_item_id) ? "POST" : "GET", sz_api_url, "GetAmenityOrders", _item_id).then(_result => {
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -518,7 +519,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -535,7 +536,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -552,7 +553,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -569,7 +570,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -586,7 +587,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -602,7 +603,7 @@ HotelTV.api = (function() {
|
||||
__apifxn_CallCmsApi((_item_id) ? "POST" : "GET", sz_api_url, "GetRoomserviceOrders", _item_id).then(_result => {
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -619,7 +620,7 @@ HotelTV.api = (function() {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
});
|
||||
});
|
||||
@@ -642,7 +643,7 @@ HotelTV.api = (function() {
|
||||
__apifxn_CallCmsApi("POST", sz_api_url, "UpdateEvent", _json_event).then(_result => {
|
||||
console.log(`Success::>${_result.data}`);
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -741,10 +742,10 @@ HotelTV.api = (function() {
|
||||
_json_report.uptime.string = _fxn_sec2Date(_json_report.uptime.second);
|
||||
|
||||
let sz_api_url = __apifxn_get_api_url("set_device_status");
|
||||
__apifxn_CallCmsApi("POST", sz_api_url, "SetDeviceStatus", _json_report).then(_result => {
|
||||
console.log(`Success::>${_result.data}`);
|
||||
__apifxn_CallCmsApi("PATCH", sz_api_url, "SetDeviceStatus", _json_report).then(_result => {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
}).catch(_error => {
|
||||
console.log(`Failure::>${_error.reason}`);
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user