perf: 修改 connect token 数据结构

pull/9133/head
ibuler 2022-11-29 14:45:29 +08:00
parent 0981cd1ed1
commit 9412c5d42d
1 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ class RDPFileClientProtocolURLMixin:
data = { data = {
'id': str(token.id), 'id': str(token.id),
'value': token.value, 'value': token.value,
'cmd': '', 'command': '',
'file': {} 'file': {}
} }
@ -148,14 +148,14 @@ class RDPFileClientProtocolURLMixin:
filename, content = self.get_rdp_file_info(token) filename, content = self.get_rdp_file_info(token)
data.update({ data.update({
'file': { 'file': {
'filename': filename, 'name': filename,
'content': content, 'content': content,
} }
}) })
else: else:
endpoint = self.get_smart_endpoint(protocol=token.endpoint_protocol, asset=token.asset) endpoint = self.get_smart_endpoint(protocol=token.endpoint_protocol, asset=token.asset)
cmd = NativeClient.get_launch_command(connect_method, token, endpoint) cmd = NativeClient.get_launch_command(connect_method, token, endpoint)
data.update({'cmd': cmd}) data.update({'command': cmd})
return data return data
def get_smart_endpoint(self, protocol, asset=None): def get_smart_endpoint(self, protocol, asset=None):