Fix: useless code

This commit is contained in:
unitwk 2023-09-03 00:10:00 +08:00
parent 25394dc61a
commit 3532be602c

View File

@ -23,16 +23,14 @@ const formRef = ref<FormInstance>();
const handleGenerateApiKey = async (enable: boolean) => {
try {
const res = await execute({
await execute({
data: {
enable
},
forceRequest: true
});
if (res.value) {
updateUserInfo();
return message.success(t("更新成功"));
}
updateUserInfo();
return message.success(t("更新成功"));
} catch (error: any) {
return message.error(error.message);
}