Fix error in upload action, if server domain ends with /

This commit is contained in:
Christoph Dyllick-Brenzinger 2024-05-28 17:09:00 +02:00
parent 1cc1926931
commit 871c24abe1

View file

@ -24,8 +24,10 @@ export async function upload(
const append = this.getNodeParameter('append', index) as string;
// get server url
const credentials = await this.getCredentials('seaTableApi');
const serverURL = credentials.domain ?? 'https://cloud.seatable.io';
const credentials: any = await this.getCredentials('seaTableApi');
const serverURL: string = credentials.domain
? credentials.domain.replace(/\/$/, '')
: 'https://cloud.seatable.io';
// get workspaceId
const workspaceId = (