Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizgar91 committed Apr 4, 2024
1 parent 7ebe1bf commit da09b20
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,17 @@ export class Payments {
return response.json()
}


/**
* Get array of services DIDs associated with a subscription.
*
* @param did - The DID of the asset.
* @returns A promise that resolves to the array of services DIDs.
*/
public async getSubscriptionAssociatedServices(subscriptionDid: string) {
const url = new URL(`/api/v1/payments/subscription/services/${subscriptionDid}`, this.environment.backend)
const url = new URL(
`/api/v1/payments/subscription/services/${subscriptionDid}`,
this.environment.backend,
)
const response = await fetch(url)
if (!response.ok) {
throw Error(response.statusText)
Expand All @@ -503,7 +505,10 @@ export class Payments {
* @returns A promise that resolves to array of files DIDs.
*/
public async getSubscriptionAssociatedFiles(subscriptionDid: string) {
const url = new URL(`/api/v1/payments/subscription/files/${subscriptionDid}`, this.environment.backend)
const url = new URL(
`/api/v1/payments/subscription/files/${subscriptionDid}`,
this.environment.backend,
)
const response = await fetch(url)
if (!response.ok) {
throw Error(response.statusText)
Expand Down

0 comments on commit da09b20

Please sign in to comment.