Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: rename url field to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala committed Dec 11, 2020
1 parent 4d54a7c commit 9669fc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions packages/interface-ipfs-core/type/pin/remote/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export interface API {

export interface Credentials {
/**
* Service URL
* Service endpoint
*/
url: URL
endpoint: URL
/**
* Service key
*/
Expand All @@ -36,9 +36,11 @@ export interface RemotePinService {
*/
service: string
/**
* Service URL
* Service endpoint URL
*/
url: URL
endpoint: URL
}

/**
* Pin count on the remote service. It is fetched from the remote service and
* is done only if `pinCount` option is used. Furthermore it may not be
Expand Down
6 changes: 3 additions & 3 deletions packages/ipfs-http-client/src/pin/remote/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class Service {
* @param {Credentials & AbortOptions & HttpOptions} options
*/
static async add (client, name, options) {
const { url, key, headers, timeout, signal } = options
const { endpoint, key, headers, timeout, signal } = options
await client.post('pin/remote/servire/rm', {
timeout,
signal,
searchParams: toUrlSearchParams({
arg: [name, url, key]
arg: [name, endpoint, key]
}),
headers
})
Expand Down Expand Up @@ -78,7 +78,7 @@ class Service {
static decodeRemoteService (json) {
return {
service: json.Service,
url: new URL(json.ApiEndpoint),
endpoint: new URL(json.ApiEndpoint),
stat: Service.decodeStat(json.stat)
}
}
Expand Down

0 comments on commit 9669fc6

Please sign in to comment.