some fixes for integrated check

This commit is contained in:
nick-delirium 2024-09-18 11:06:27 +02:00
parent c94ca6fb88
commit a7a1eca9c3
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
3 changed files with 7 additions and 2 deletions

View file

@ -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">

View file

@ -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);

View file

@ -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