前端APIのURL参数化対応およびバックエンドのBugFix

This commit is contained in:
2023-11-08 15:44:42 +09:00
parent 5951fcc108
commit 0f154832a5
14 changed files with 58 additions and 42 deletions

View File

@@ -120,7 +120,7 @@ const columns = [
const getDomain = () => {
loading.value = true;
api.get(`http://127.0.0.1:8000/api/domains/testtenant`).then(res => {
api.get(`api/domains/testtenant`).then(res => {
rows.length = 0;
res.data.forEach((item) => {
rows.push({ id:item.id,tenantid: item.tenantid,name: item.name, url: item.url, user: item.kintoneuser, password: item.kintonepwd });
@@ -153,7 +153,7 @@ onMounted(() => {
}
const deleteDomain = () => {
api.delete(`http://127.0.0.1:8000/api/domain/`+ editId.value).then(() =>{
api.delete(`api/domain/${editId.value}`).then(() =>{
getDomain();
})
editId.value = 0;
@@ -183,7 +183,7 @@ onMounted(() => {
const onSubmit = () => {
if(editId.value !== 0)
{
api.put(`http://127.0.0.1:8000/api/domain`,{
api.put(`api/domain`,{
'id': editId.value,
'tenantid': tenantid.value,
'name': name.value,
@@ -198,7 +198,7 @@ onMounted(() => {
}
else
{
api.post(`http://127.0.0.1:8000/api/domain`,{
api.post(`api/domain`,{
'id': 0,
'tenantid': tenantid.value,
'name': name.value,

View File

@@ -223,7 +223,7 @@ const newDomain = () => {
const activeDomain = (id:number) => {
api.put(`http://127.0.0.1:8000/api/activedomain/`+ id).then(() =>{
api.put(`api/activedomain/`+ id).then(() =>{
getDomain();
})
};
@@ -234,7 +234,7 @@ const deleteConfirm = (row:object) => {
};
const deleteDomain = () => {
api.delete(`http://127.0.0.1:8000/api/domain/`+ editId.value+'/1').then(() =>{
api.delete(`api/domain/`+ editId.value+'/1').then(() =>{
getDomain();
})
editId.value = 0;
@@ -248,16 +248,16 @@ const closeDg = (val:string) => {
{
dodmainids.push(domains[key].id);
}
api.post(`http://127.0.0.1:8000/api/domain`, dodmainids).then(() =>{getDomain();});
api.post(`api/domain`, dodmainids).then(() =>{getDomain();});
}
};
const getDomain = () => {
api.get(`http://127.0.0.1:8000/api/activedomain`).then(res => {
api.get(`api/activedomain`).then(res => {
activedomainid.value = res.data.id;
authStore.changedomain(res.data.name);
});
api.get(`http://127.0.0.1:8000/api/domain`).then(res => {
api.get(`api/domain`).then(res => {
rows.length = 0;
res.data.forEach((item) => {
rows.push({ id:item.id,name: item.name, url: item.url, kintoneuser: item.kintoneuser, kintonepwd: item.kintonepwd});