Index: arms/js/pdService.js =================================================================== diff -u -rea21967eae325e083b2903fe23192e38ec44c1f9 -r443af8f670e58218aa2ae1706293282033245ebf --- arms/js/pdService.js (.../pdService.js) (revision ea21967eae325e083b2903fe23192e38ec44c1f9) +++ arms/js/pdService.js (.../pdService.js) (revision 443af8f670e58218aa2ae1706293282033245ebf) @@ -20,15 +20,17 @@ maximumSelectionLength: 5, width: 'resolve', ajax: { - url: "https://api.github.com/search/repositories", + url: function (params) { + return '/auth-check/getUsers/' + params.term; + }, dataType: "json", delay: 250, - data: function (params) { - return { - q: params.term, // search term - page: params.page, - }; - }, + //data: function (params) { + // return { + // q: params.term, // search term + // page: params.page, + // }; + //}, processResults: function (data, params) { // parse the results into the format expected by Select2 // since we are using custom formatting functions we do not need to @@ -37,7 +39,7 @@ params.page = params.page || 1; return { - results: data.items, + results: data, pagination: { more: params.page * 30 < data.total_count, }, @@ -47,48 +49,30 @@ }, placeholder: "리뷰어 설정을 위한 계정명을 입력해 주세요", minimumInputLength: 1, - templateResult: formatRepo, + templateResult: formatUser, templateSelection: formatRepoSelection, }); -function formatRepo(repo) { - if (repo.loading) { - return repo.text; - } - +function formatUser(jsonData) { var $container = $( - "