Skip to content

Commit

Permalink
Merge pull request #633 from GemeenteNijmegen/acceptance
Browse files Browse the repository at this point in the history
chore: Updates and logging
  • Loading branch information
joostvanderborg authored Nov 25, 2024
2 parents 2882aa3 + dab11d4 commit 381a8a5
Show file tree
Hide file tree
Showing 7 changed files with 1,214 additions and 1,128 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 15 additions & 14 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/app/linkuser/TribeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export class TribeApi {
if (error.response) {
// The request was made and the server responded with a status code
// that falls out of the range of 2xx
console.log(error.response.data);
console.log(error.response.status);
console.log(error.response.headers);
} else if (error.request) {
Expand All @@ -56,7 +55,6 @@ export class TribeApi {

async post(url: string, params?: any) {
try {
console.debug('posting ', this.axios.getUri({ url, params }));
const response = await this.axios.post(url, params);
if (typeof response.data === 'string') {
return JSON.parse(response.data);
Expand All @@ -66,7 +64,6 @@ export class TribeApi {
if (error.response) {
// The request was made and the server responded with a status code
// that falls out of the range of 2xx
console.error(error.response.data);
console.error(error.response.status);
console.error(error.response.headers);
} else if (error.request) {
Expand Down
6 changes: 1 addition & 5 deletions src/app/linkuser/TribeUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export class TribeUser {
if (await this.exists()) {
return this.update(fields);
}
console.debug('creating user', fields);
try {
// Add BSN to new relation in Tribe.
fields[TribeApi.bsnField] = this.bsn.bsn;
Expand All @@ -122,7 +121,6 @@ export class TribeUser {
});
this.relationId = personRelationId;
this.inwonerId = inwonerId;
console.debug('created user', this);
return true;
} catch (error) {
console.debug(error);
Expand Down Expand Up @@ -178,7 +176,6 @@ export class TribeUser {
}

async createAddress(fields: Partial<Address>) {
console.debug('updating address', fields);
if (await this.hasAddress()) {
return this.updateAddress(fields);
}
Expand All @@ -192,11 +189,10 @@ export class TribeUser {
console.debug('about to post');
try {
const result = await this.tribeApi.postAddress(fields, this.relationId);
console.debug('created address', this);
console.debug(result);
return result;
} catch (error) {
console.error('Updating address failed', error);
}
}
}
}
Loading

0 comments on commit 381a8a5

Please sign in to comment.