GitHub(nextgroup2706/ken_nogi)は今後使わず自社Gitea運用に切替え。 NodeSrvは旧リポジトリの履歴を破棄しファイルのみ統合(Dokploy用サービスアカウントは 別途mygit-admin/NodeSrv.gitに履歴あり)。notepmエクスポート(12GB)とPleasanter インストーラzip(208MB)はサイズが大きいため.gitignoreで除外。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
50 lines
1.4 KiB
JavaScript
50 lines
1.4 KiB
JavaScript
$p.ex.getUserList = function () {
|
|
let userList = {};
|
|
|
|
function sendRequest(offset) {
|
|
//送信データ
|
|
let json = {
|
|
"ApiVersion": 1.1,
|
|
"ApiKey": "6504c8a807677a3a576e10327f3c19876c55736ee45d4a845796b9e7f5e087bfd4bd0d8184863da8cf1733ca635111432ab334aea59102b06a96ee6d2c05190d",
|
|
"Offset": offset,
|
|
"View": {
|
|
"ApiGetMailAddresses": true,
|
|
},
|
|
};
|
|
//データ取得リクエスト
|
|
const url = 'https://' + location.hostname + '/pleasanter/api/users/get';
|
|
const xhr = new XMLHttpRequest(); //XMLHttpRequestの作成
|
|
|
|
//HTTPリクエスト実行
|
|
xhr.open('POST', url, false);
|
|
xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8');
|
|
xhr.onload = () => { //XMLHttpRequestのリクエストステータスの確認
|
|
if (xhr.status === 200) {
|
|
//success
|
|
data = JSON.parse(xhr.responseText);
|
|
$.each(data.Response.Data, function (index, value) {
|
|
userList[value.UserId] = {
|
|
"name": value.Name,
|
|
"userId": value.UserId,
|
|
"deptId": value.DeptId,
|
|
"mailAddress": value.MailAddresses[0],
|
|
};
|
|
});
|
|
|
|
if ((data.Response.Offset + data.Response.PageSize) <= data.Response.TotalCount) {
|
|
sendRequest(data.Response.Offset + data.Response.PageSize);
|
|
}
|
|
|
|
} else {
|
|
//error
|
|
console.log(JSON.parse(xhr.responseText));
|
|
}
|
|
};
|
|
xhr.send(JSON.stringify(json));
|
|
}
|
|
|
|
sendRequest(0);
|
|
//console.log(userList);
|
|
|
|
return userList;
|
|
} |