Skip to content

Commit 3908815

Browse files
committed
fixup
1 parent 7323321 commit 3908815

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ui/src/api/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function postAPI (command, data = {}) {
4747
params.append('response', 'json')
4848
if (data) {
4949
Object.entries(data).forEach(([key, value]) => {
50-
if (value !== undefined) {
50+
if (value !== undefined && value !== null) {
5151
params.append(key, value)
5252
}
5353
})

ui/src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {
4444
import { VueAxios } from './utils/request'
4545
import directives from './utils/directives'
4646
import Cookies from 'js-cookie'
47-
import { api } from '@/api'
47+
import { getAPI } from '@/api'
4848
import { applyCustomGuiTheme } from './utils/guiTheme'
4949

5050
vueApp.use(VueAxios, router)
@@ -106,7 +106,7 @@ fetch('config.json?ts=' + Date.now())
106106
let domainid = null
107107

108108
if (userid !== undefined && Cookies.get('sessionkey')) {
109-
await api('listUsers', { userid: userid }).then(response => {
109+
await getAPI('listUsers', { userid: userid }).then(response => {
110110
accountid = response.listusersresponse.user[0].accountid
111111
domainid = response.listusersresponse.user[0].domainid
112112
})

ui/src/utils/guiTheme.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// under the License.
1717

1818
import { vueProps } from '@/vue-app'
19-
import { api } from '@/api'
19+
import { getAPI } from '@/api'
2020

2121
export async function applyCustomGuiTheme (accountid, domainid) {
2222
await fetch('config.json').then(response => response.json()).then(config => {
@@ -45,7 +45,7 @@ export async function applyCustomGuiTheme (accountid, domainid) {
4545
}
4646

4747
async function fetchGuiTheme (params) {
48-
return await api('listGuiThemes', params).then(response => {
48+
return await getAPI('listGuiThemes', params).then(response => {
4949
if (response.listguithemesresponse.guiThemes) {
5050
return response.listguithemesresponse.guiThemes[0]
5151
}

0 commit comments

Comments
 (0)