some fixes for integrated check
This commit is contained in:
parent
c94ca6fb88
commit
a7a1eca9c3
3 changed files with 7 additions and 2 deletions
|
|
@ -112,6 +112,11 @@ function Integrations(props: Props) {
|
|||
const allIntegrations = filteredIntegrations.flatMap(
|
||||
(cat) => cat.integrations
|
||||
);
|
||||
|
||||
console.log(
|
||||
allIntegrations,
|
||||
integratedList
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<div className="bg-white rounded-lg border shadow-sm p-5 mb-4">
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class GenericIntegrationsStore {
|
|||
fetchIntegrations = async (siteId?: string) => {
|
||||
this.setLoading(true);
|
||||
try {
|
||||
const { data } = await integrationsService.fetchList(siteId);
|
||||
const { data } = await integrationsService.fetchList(undefined, siteId);
|
||||
this.setList(data);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import BaseService from "./BaseService";
|
|||
|
||||
export default class IntegrationsService extends BaseService {
|
||||
fetchList = async (name?: string, siteId?: string) => {
|
||||
const r = await this.client.get(`${siteId ? `/${siteId}` : ''}/integrations/${name}`)
|
||||
const r = await this.client.get(`${siteId ? `/${siteId}` : ''}/integrations${name ? `/${name}` : ''}`)
|
||||
const data = await r.json()
|
||||
|
||||
return data
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue