fix(PostBin Node): Update base URL for postbin node (#15358)

This commit is contained in:
Nikhil Kuriakose
2025-05-14 10:00:16 +02:00
committed by GitHub
parent 6a70841a05
commit 0cddc9576f
4 changed files with 9 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ export const binOperations: INodeProperties[] = [
routing: { routing: {
request: { request: {
method: 'POST', method: 'POST',
url: '/developers/postbin/api/bin', url: '/api/bin',
}, },
output: { output: {
postReceive: [transformBinResponse], postReceive: [transformBinResponse],

View File

@@ -51,7 +51,7 @@ export async function buildBinAPIURL(
): Promise<IHttpRequestOptions> { ): Promise<IHttpRequestOptions> {
const binId = parseBinId(this); const binId = parseBinId(this);
// Assemble the PostBin API URL and put it back to requestOptions // Assemble the PostBin API URL and put it back to requestOptions
requestOptions.url = `/developers/postbin/api/bin/${binId}`; requestOptions.url = `/api/bin/${binId}`;
return requestOptions; return requestOptions;
} }
@@ -69,7 +69,7 @@ export async function buildBinTestURL(
const binId = parseBinId(this); const binId = parseBinId(this);
// Assemble the PostBin API URL and put it back to requestOptions // Assemble the PostBin API URL and put it back to requestOptions
requestOptions.url = `/developers/postbin/${binId}`; requestOptions.url = `/${binId}`;
return requestOptions; return requestOptions;
} }
@@ -86,7 +86,7 @@ export async function buildRequestURL(
const reqId = this.getNodeParameter('requestId', 'shift') as string; const reqId = this.getNodeParameter('requestId', 'shift') as string;
const binId = parseBinId(this); const binId = parseBinId(this);
requestOptions.url = `/developers/postbin/api/bin/${binId}/req/${reqId}`; requestOptions.url = `/api/bin/${binId}/req/${reqId}`;
return requestOptions; return requestOptions;
} }
@@ -107,8 +107,8 @@ export async function transformBinResponse(
nowIso: new Date(item.json.now as string).toISOString(), nowIso: new Date(item.json.now as string).toISOString(),
expiresTimestamp: item.json.expires, expiresTimestamp: item.json.expires,
expiresIso: new Date(item.json.expires as string).toISOString(), expiresIso: new Date(item.json.expires as string).toISOString(),
requestUrl: 'https://www.toptal.com/developers/postbin/' + (item.json.binId as string), requestUrl: 'https://www.postb.in/' + (item.json.binId as string),
viewUrl: 'https://www.toptal.com/developers/postbin/b/' + (item.json.binId as string), viewUrl: 'https://www.postb.in/b/' + (item.json.binId as string),
}), }),
); );
return items; return items;

View File

@@ -21,7 +21,7 @@ export class PostBin implements INodeType {
outputs: [NodeConnectionTypes.Main], outputs: [NodeConnectionTypes.Main],
credentials: [], credentials: [],
requestDefaults: { requestDefaults: {
baseURL: 'https://www.toptal.com', baseURL: 'https://www.postb.in',
}, },
properties: [ properties: [
{ {

View File

@@ -22,7 +22,7 @@ export const requestOperations: INodeProperties[] = [
routing: { routing: {
request: { request: {
method: 'GET', method: 'GET',
url: '=/developers/postbin/api/bin/{{$parameter["binId"]}}/req/{{$parameter["requestId"]}}', url: '=/api/bin/{{$parameter["binId"]}}/req/{{$parameter["requestId"]}}',
}, },
send: { send: {
preSend: [ preSend: [
@@ -40,7 +40,7 @@ export const requestOperations: INodeProperties[] = [
routing: { routing: {
request: { request: {
method: 'GET', method: 'GET',
url: '=/developers/postbin/api/bin/{{$parameter["binId"]}}/req/shift', url: '=/api/bin/{{$parameter["binId"]}}/req/shift',
}, },
send: { send: {
preSend: [ preSend: [