mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(PostBin Node): Update base URL for postbin node (#15358)
This commit is contained in:
@@ -22,7 +22,7 @@ export const binOperations: INodeProperties[] = [
|
||||
routing: {
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: '/developers/postbin/api/bin',
|
||||
url: '/api/bin',
|
||||
},
|
||||
output: {
|
||||
postReceive: [transformBinResponse],
|
||||
|
||||
@@ -51,7 +51,7 @@ export async function buildBinAPIURL(
|
||||
): Promise<IHttpRequestOptions> {
|
||||
const binId = parseBinId(this);
|
||||
// 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;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ export async function buildBinTestURL(
|
||||
const binId = parseBinId(this);
|
||||
|
||||
// Assemble the PostBin API URL and put it back to requestOptions
|
||||
requestOptions.url = `/developers/postbin/${binId}`;
|
||||
requestOptions.url = `/${binId}`;
|
||||
return requestOptions;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export async function buildRequestURL(
|
||||
const reqId = this.getNodeParameter('requestId', 'shift') as string;
|
||||
const binId = parseBinId(this);
|
||||
|
||||
requestOptions.url = `/developers/postbin/api/bin/${binId}/req/${reqId}`;
|
||||
requestOptions.url = `/api/bin/${binId}/req/${reqId}`;
|
||||
return requestOptions;
|
||||
}
|
||||
|
||||
@@ -107,8 +107,8 @@ export async function transformBinResponse(
|
||||
nowIso: new Date(item.json.now as string).toISOString(),
|
||||
expiresTimestamp: item.json.expires,
|
||||
expiresIso: new Date(item.json.expires as string).toISOString(),
|
||||
requestUrl: 'https://www.toptal.com/developers/postbin/' + (item.json.binId as string),
|
||||
viewUrl: 'https://www.toptal.com/developers/postbin/b/' + (item.json.binId as string),
|
||||
requestUrl: 'https://www.postb.in/' + (item.json.binId as string),
|
||||
viewUrl: 'https://www.postb.in/b/' + (item.json.binId as string),
|
||||
}),
|
||||
);
|
||||
return items;
|
||||
|
||||
@@ -21,7 +21,7 @@ export class PostBin implements INodeType {
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
credentials: [],
|
||||
requestDefaults: {
|
||||
baseURL: 'https://www.toptal.com',
|
||||
baseURL: 'https://www.postb.in',
|
||||
},
|
||||
properties: [
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ export const requestOperations: INodeProperties[] = [
|
||||
routing: {
|
||||
request: {
|
||||
method: 'GET',
|
||||
url: '=/developers/postbin/api/bin/{{$parameter["binId"]}}/req/{{$parameter["requestId"]}}',
|
||||
url: '=/api/bin/{{$parameter["binId"]}}/req/{{$parameter["requestId"]}}',
|
||||
},
|
||||
send: {
|
||||
preSend: [
|
||||
@@ -40,7 +40,7 @@ export const requestOperations: INodeProperties[] = [
|
||||
routing: {
|
||||
request: {
|
||||
method: 'GET',
|
||||
url: '=/developers/postbin/api/bin/{{$parameter["binId"]}}/req/shift',
|
||||
url: '=/api/bin/{{$parameter["binId"]}}/req/shift',
|
||||
},
|
||||
send: {
|
||||
preSend: [
|
||||
|
||||
Reference in New Issue
Block a user