Skip to content

Commit

Permalink
fix(Conn): 修复重构后编辑lagrange自定义签名,会导致签名丢失的问题 (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAnotherID authored Nov 2, 2024
1 parent c26fe45 commit 9aa4ba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api/im_connections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function postConnectSetData(

export function postSetSignServer(
id: string,
signServerUrl: '' | 'sealdice' | 'lagrange',
signServerUrl: string | 'sealdice' | 'lagrange',
w: boolean,
signServerVersion: string,
) {
Expand Down
7 changes: 3 additions & 4 deletions src/components/PageConnectInfoItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
<el-button @click="dialogSetSignServerVisible = false">取消</el-button>
<el-button
type="primary"
:disabled="form.signServerType === 2 && form.signServerUrl === ''"
:disabled="form.signServerType === 2 && isEmpty(trim(form.signServerUrl))"
@click="doSetSignServer"
>确定</el-button
>
Expand Down Expand Up @@ -1833,6 +1833,7 @@ import {
postSmsCodeSet,
} from '~/api/im_connections';
import { postToolOnebot } from '~/api/others';
import { isEmpty, trim } from 'lodash-es';
dayjs.extend(relativeTime);
Expand Down Expand Up @@ -2176,9 +2177,7 @@ const doSetSignServer = async () => {
}
const ret = await postSetSignServer(
form.endpoint.id,
['sealdice', 'lagrange'].includes(form.signServerUrl)
? (form.signServerUrl as 'sealdice' | 'lagrange')
: '',
trim(form.signServerUrl),
true,
form.signServerVersion,
);
Expand Down

0 comments on commit 9aa4ba5

Please sign in to comment.