Skip to content

Commit

Permalink
Merge pull request #755 from companieshouse/chore/server-url-log
Browse files Browse the repository at this point in the history
debug: differentiate between PUT and GET debuggers for overseas entity service
  • Loading branch information
mwejuli-ch authored Feb 24, 2025
2 parents 5e42ae2 + 8286f98 commit 1c97aad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/services/overseas-entities/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export default class OverseasEntityService {
const URL = `transactions/${transactionId}/overseas-entity/${overseasEntityId}${(forceFetch ? "?force=true" : "")}`
const response: HttpResponse = await this.client.httpGet(URL);

console.log("DDDDDDDDDDD1 getOverseasEntity forceFetch: " + forceFetch);
console.log("DDDDDDDDDDD2 getOverseasEntity URL: " + URL);
console.log(`getOverseasEntity forceFetch value: ${forceFetch}`);
console.log(`getOverseasEntity URL: ${URL}`);

if (response.error) {
return {
httpStatusCode: response.status,
Expand Down Expand Up @@ -89,8 +90,8 @@ export default class OverseasEntityService {
public async putOverseasEntity (transactionId: string, overseasEntityId: string, body: OverseasEntity, forceUpdate: boolean = false): Promise<Resource<HttpStatusCode> | ApiErrorResponse> {
const URL = `transactions/${transactionId}/overseas-entity/${overseasEntityId}${(forceUpdate ? "?force=true" : "")}`

console.log("DDDDDDDDDDD3 getOverseasEntity forceFetch: " + forceUpdate);
console.log("DDDDDDDDDDD4 getOverseasEntity URL: " + URL);
console.log(`putOverseasEntity forceUpdate value: ${forceUpdate}`);
console.log(`putOverseasEntity URL: ${URL}`);
const resp = await this.client.httpPut(URL, mapOverseasEntity(body));

if (resp.error) {
Expand Down

0 comments on commit 1c97aad

Please sign in to comment.