Browse Source

chore: set default value for Azure's api version if not set

JustSong 2 years ago
parent
commit
ef9dca28f5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      web/src/pages/Channel/EditChannel.js

+ 3 - 0
web/src/pages/Channel/EditChannel.js

@@ -46,6 +46,9 @@ const EditChannel = () => {
     if (localInputs.base_url.endsWith('/')) {
     if (localInputs.base_url.endsWith('/')) {
       localInputs.base_url = localInputs.base_url.slice(0, localInputs.base_url.length - 1);
       localInputs.base_url = localInputs.base_url.slice(0, localInputs.base_url.length - 1);
     }
     }
+    if (localInputs.type === 3 && localInputs.other === '') {
+      localInputs.other = '2023-03-15-preview';
+    }
     let res;
     let res;
     if (isEdit) {
     if (isEdit) {
       res = await API.put(`/api/channel/`, { ...localInputs, id: parseInt(channelId) });
       res = await API.put(`/api/channel/`, { ...localInputs, id: parseInt(channelId) });