wolfboys commented on code in PR #3833:
URL:
https://github.com/apache/incubator-streampark/pull/3833#discussion_r1665913258
##########
streampark-console/streampark-console-webapp/src/views/setting/system/SettingForm.vue:
##########
@@ -93,33 +93,19 @@
const formData = await validate();
if (type.value === 'docker') {
const resp = await fetchVerifyDocker(formData);
- switch (resp.status) {
- case 200:
- await fetchDockerUpdate(formData);
- break;
- case 400:
- Swal.fire({
- icon: 'error',
- title: t('setting.system.update.dockerNotStart'),
- showConfirmButton: true,
- timer: 3500,
- });
- return;
- case 500:
- Swal.fire({
- icon: 'error',
- title: resp.msg,
- showConfirmButton: true,
- timer: 3500,
- });
- return;
- default:
- break;
- }
+ if (resp.data.code == 200) {
+ await fetchDockerUpdate(formData);
+ } else {
+ Swal.fire({
+ icon: 'error',
+ title: resp.data.message,
+ showConfirmButton: true,
+ timer: 3500,
+ });
}
if (type.value === 'email') {
const resp = await fetchVerifyEmail(formData);
- if (resp.status === 200) {
+ if (resp.data.code == 200) {
Review Comment:
good job
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]