fix api call result
This commit is contained in:
@@ -181,8 +181,8 @@ let ownerid = ref('');
|
||||
const getDomain = async () => {
|
||||
loading.value = true;
|
||||
const userId = authStore.userId;
|
||||
const result = await api.get<IDomain[]>(`api/domain?userId=${userId}`);
|
||||
rows.value = result.data.map((item) => {
|
||||
const result = await api.get<IDomain[]>(`api/domains`);
|
||||
rows.value = result.data.data.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
tenantid: item.tenantid,
|
||||
@@ -216,8 +216,7 @@ const deleteDomain = () => {
|
||||
api.delete(`api/domain/${editId.value}`).then(() => {
|
||||
getDomain();
|
||||
})
|
||||
editId.value = 0;
|
||||
|
||||
editId.value = 0; // set in removeRow()
|
||||
};
|
||||
|
||||
const editRow = (row) => {
|
||||
@@ -259,6 +258,7 @@ const onSubmit = () => {
|
||||
'is_active': domainActive.value,
|
||||
'ownerid': authStore.userId || ''
|
||||
}
|
||||
// for search: api.put(`api/domain`)、api.post(`api/domain`)
|
||||
api[method].apply(api, [`api/domain`, param]).then(() => {
|
||||
getDomain();
|
||||
domainStore.loadUserDomains();
|
||||
|
||||
Reference in New Issue
Block a user