issue #11 Done Amenity&Room service renewal
This commit is contained in:
@@ -148,7 +148,7 @@ HotelTV.api = (function() {
|
||||
}
|
||||
|
||||
xhr.onload = function() {
|
||||
if (xhr.status === 200 || xhr.status === 201) {
|
||||
if (xhr.status === 200 || xhr.status === 201 || xhr.status === 204) {
|
||||
_ret.error = false;
|
||||
_ret.data = xhr.response;
|
||||
resolve(_ret);
|
||||
@@ -556,15 +556,15 @@ HotelTV.api = (function() {
|
||||
* HotelTV API ::> delete amenity carts info
|
||||
* @param {string} _cart_id
|
||||
* @returns
|
||||
* null: if _item_id isn't null it will return specified info with _item_id
|
||||
* null: 성공하면 리턴값 없음.
|
||||
* {dictionary}
|
||||
*/
|
||||
DeleteAmenityCarts: function(_cart_id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let sz_api_url = __apifxn_get_api_url("delete_carts_amenity");
|
||||
__apifxn_CallCmsApi("DELETE", `${sz_api_url}/${_cart_id}`, "DeleteAmenityCarts", null).then(_result => {
|
||||
__apifxn_CallCmsApi("DELETE",_cart_id==null ? `${sz_api_url}` : `${sz_api_url}/${_cart_id}`, "DeleteAmenityCarts", null).then(_result => {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
resolve();
|
||||
}).catch(_error => {
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
@@ -704,9 +704,9 @@ HotelTV.api = (function() {
|
||||
DeleteRoomserviceCarts: function(_cart_id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let sz_api_url = __apifxn_get_api_url("delete_carts_roomservice");
|
||||
__apifxn_CallCmsApi("DELETE", `${sz_api_url}/${_cart_id}`, "DeleteRoomserviceCarts", null).then(_result => {
|
||||
__apifxn_CallCmsApi("DELETE", _cart_id==null ? `${sz_api_url}` : `${sz_api_url}/${_cart_id}`, "DeleteRoomserviceCarts", null).then(_result => {
|
||||
//console.log(`Success::>${_result.data}`);
|
||||
resolve(JSON.parse(_result.data));
|
||||
resolve();
|
||||
}).catch(_error => {
|
||||
console.error(`Failure::>${_error.reason}`);
|
||||
reject(_error.reason);
|
||||
|
||||
Reference in New Issue
Block a user