mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix: type error when user add port for s3 storages.
This commit is contained in:
+2
-1
@@ -51,7 +51,8 @@ export const ChannelTestButton = ({channel, organizationId, kind}: NotifierTestC
|
||||
toast.success("Successfully connected to storage channel");
|
||||
} else {
|
||||
console.error(result);
|
||||
toast.error("An error occurred while testing the storage channel, check your configuration");
|
||||
const responseText = result.response ? `(${result.response})` : "";
|
||||
toast.error(`An error occurred while testing the storage channel, check your configuration ${responseText}`);
|
||||
}
|
||||
} else {
|
||||
toast.error("Not yet supported");
|
||||
|
||||
@@ -97,12 +97,14 @@ export async function dispatchStorage(
|
||||
}
|
||||
|
||||
|
||||
return await dispatchViaProvider(
|
||||
const dispatchResult = await dispatchViaProvider(
|
||||
channel.provider as StorageProviderKind,
|
||||
channel.config,
|
||||
input,
|
||||
);
|
||||
|
||||
console.log(dispatchResult);
|
||||
return dispatchResult;
|
||||
|
||||
} catch (err: any) {
|
||||
return {
|
||||
|
||||
@@ -18,7 +18,7 @@ async function getS3Client(config: S3Config) {
|
||||
region: config.region ?? "us-east-1",
|
||||
accessKey: config.accessKey,
|
||||
secretKey: config.secretKey,
|
||||
port: config.port ?? 443,
|
||||
port: config.port ? Number(config.port) : 443,
|
||||
useSSL: config.ssl ?? true,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user