Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Apr 27, 2025

Fixed: Fix the issue with direct connection for SFTP.

@ZhaoJiSen ZhaoJiSen merged commit 55f7855 into dev Apr 27, 2025
3 of 4 checks passed
@fit2bot fit2bot requested a review from a team April 27, 2025 03:17
@ZhaoJiSen ZhaoJiSen deleted the pr@dev@fix_sftp_connect branch April 27, 2025 03:17
@@ -115,8 +115,7 @@ export default {
const url = this.formatterArgs.assetUrl.replace('{id}', assetId)
const res = await this.$axios.get(url)

// TODO 暂时将 sftp 隐藏
this.protocols = res.protocols.filter(protocol => (protocol.name !== 'sftp') && (protocol.name !== 'winrm')) || []
this.protocols = res.protocols.filter(protocol => (protocol.name !== 'winrm')) || []
} catch (e) {
throw new Error(`Error getting protocols: ${e}`)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first difference between two versions of the code is that we now have "export" keyword instead of the previous import statement which makes it difficult to use other files.

For potential issues:

It seems like there might be some errors in the JavaScript syntax used here but not clearly mentioned. There should probably no need to add @ before the line number because you already specified it as global level scope.

Also, please make sure these changes do not interfere with existing dependencies/usage in any way!

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants