mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🔀 Merge branch 'seatable-seatable-node'
This commit is contained in:
commit
afbf905f88
|
@ -129,7 +129,7 @@ export async function getBaseAccessToken(this: IExecuteFunctions | ILoadOptionsF
|
||||||
|
|
||||||
export function resolveBaseUri(ctx: ICtx) {
|
export function resolveBaseUri(ctx: ICtx) {
|
||||||
return (ctx?.credentials?.environment === 'cloudHosted')
|
return (ctx?.credentials?.environment === 'cloudHosted')
|
||||||
? 'https://cloud.seatable.io' : ctx?.credentials?.domain;
|
? 'https://cloud.seatable.io' : userBaseUri(ctx?.credentials?.domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function simplify(data: { results: IRow[] }, metadata: IDataObject) {
|
export function simplify(data: { results: IRow[] }, metadata: IDataObject) {
|
||||||
|
@ -292,3 +292,15 @@ export const split = (subject: string): string[] =>
|
||||||
.filter(s => s.length)
|
.filter(s => s.length)
|
||||||
.map(s => s.replace(/\\([\s\S])/gm, ($0, $1) => $1))
|
.map(s => s.replace(/\\([\s\S])/gm, ($0, $1) => $1))
|
||||||
;
|
;
|
||||||
|
|
||||||
|
const userBaseUri = (uri?: string) => {
|
||||||
|
if (uri === undefined) {
|
||||||
|
return uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uri.endsWith('/')) {
|
||||||
|
return uri.slice(0, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return uri;
|
||||||
|
};
|
||||||
|
|
|
@ -93,9 +93,9 @@ export interface ICtx {
|
||||||
|
|
||||||
export interface IRowResponse{
|
export interface IRowResponse{
|
||||||
metadata: [
|
metadata: [
|
||||||
{
|
{
|
||||||
key: string,
|
key: string,
|
||||||
name: string
|
name: string,
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
results: IRow[];
|
results: IRow[];
|
||||||
|
|
Loading…
Reference in a new issue