261028_01_ENH: 새로운 KART 연동
This commit is contained in:
@@ -101,9 +101,7 @@ kon.survey = (function () {
|
||||
|
||||
var apiWaits = [];
|
||||
if (nextinput.val() === "END") {
|
||||
var isKiwi = 1;
|
||||
var kartRequestUrl = "https://rapi.kric.com/api/v1/project/derived/"+isKiwi+"/"+kon.survey.PKEY+"/"+kon.survey.IDKEY;
|
||||
apiWaits.push(callLoggedApi(kartRequestUrl, "DERIVED", kon.survey.IDKEY, "", ""));
|
||||
apiWaits.push(callKartDerived(kon.survey.PKEY, kon.survey.IDKEY));
|
||||
}
|
||||
|
||||
if (surveyType === "LIST") {
|
||||
@@ -193,6 +191,41 @@ kon.survey = (function () {
|
||||
});
|
||||
}
|
||||
|
||||
function callKartDerived(pkey, idkey) {
|
||||
var url = KART_BASE_URL
|
||||
+ "/project/" + KART_PROJECT_TYPE
|
||||
+ "/" + encodeURIComponent(pkey)
|
||||
+ "/derived/respondent/" + encodeURIComponent(idkey)
|
||||
+ "/recalculate";
|
||||
|
||||
logExternalApi("DERIVED", idkey, "", "REQUEST", "");
|
||||
|
||||
return $.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
headers: {
|
||||
"X-API-Key": KON_KIWI_API_KEY
|
||||
},
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
timeout: 60000,
|
||||
|
||||
success: function (data, status, xhr) {
|
||||
logExternalApi(
|
||||
"DERIVED", idkey, "", "SUCCESS",
|
||||
"HTTP " + xhr.status
|
||||
);
|
||||
},
|
||||
|
||||
error: function (xhr, status) {
|
||||
logExternalApi(
|
||||
"DERIVED", idkey, "", "FAIL",
|
||||
"HTTP " + xhr.status + " / " + status
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function callContactStatusApi(contactMappingList, idkey, statuses) {
|
||||
var allRequestsDone = $.Deferred();
|
||||
var mappingsLeft = contactMappingList.length;
|
||||
|
||||
Reference in New Issue
Block a user