generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Add prison api builder to test memory (#202)"
This reverts commit 04caac5.
- Loading branch information
1 parent
04caac5
commit 64d3189
Showing
5 changed files
with
5 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import { Readable } from 'stream' | ||
import { RestClientBuilder } from '../data' | ||
import { PrisonApiClient } from '../data/interfaces/prisonApiClient' | ||
import PrisonApiClient from '../data/prisonApiClient' | ||
|
||
export default class OffenderService { | ||
constructor(private readonly prisonClientBuilder: RestClientBuilder<PrisonApiClient>) {} | ||
|
||
getPrisonerImage(token: string, offenderNumber: string): Promise<Readable> { | ||
return this.prisonClientBuilder(token).getPrisonerImage(offenderNumber, true) | ||
return new PrisonApiClient(token).getPrisonerImage(offenderNumber, true) | ||
} | ||
|
||
getImage(token: string, imageId: string): Promise<Readable> { | ||
return this.prisonClientBuilder(token).getImage(imageId, true) | ||
return new PrisonApiClient(token).getImage(imageId, true) | ||
} | ||
} |