Skip to content

Commit

Permalink
Update d2-api
Browse files Browse the repository at this point in the history
  • Loading branch information
tokland committed Jul 24, 2024
1 parent d8592d8 commit 8650c32
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 162 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"author": "EyeSeeTea <arnau@eyeseetea.com>",
"license": "MIT",
"dependencies": {
"@eyeseetea/d2-api": "1.16.0-beta.2",
"@eyeseetea/d2-api": "1.16.0-beta.3",
"@types/json-diff": "^0.7.0",
"async-parallel": "^1.2.3",
"cmd-ts": "^0.10.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _ from "lodash";
import { D2Api } from "@eyeseetea/d2-api/2.36";
import log from "utils/log";
import { PermissionFixerUserGroupExtended } from "domain/entities/user-monitoring/permission-fixer/PermissionFixerUserGroupExtended";
Expand Down Expand Up @@ -26,15 +27,15 @@ export class PermissionFixerUserGroupD2Repository implements PermissionFixerUser
async save(userGroup: PermissionFixerUserGroupExtended): Async<string> {
try {
const response = await this.api.models.userGroups.put(userGroup).getData();
if (response.status == "OK") {
if (_.isEmpty(response.errorReports)) {
log.info("Users added to minimal group");
} else {
log.error("Error adding users to minimal group");
}

log.info(JSON.stringify(response.response));
log.info(JSON.stringify(response));

return response.status;
return "OK";
} catch (error) {
console.debug(error);
return "ERROR";
Expand Down
Loading

0 comments on commit 8650c32

Please sign in to comment.