/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
apps/dashboard/src/api/bridge.ts
24 строки
676 B
Sokratis Vidros
fix(dashboard): Always trust the URL for the environment selection (#7223)
06 дек 2024, 19:17
Не верифицирован
06 дек 2024, 19:17
ba519c2
Код
Авторство
О чём код?
import type { HealthCheck } from '@novu/framework/internal'; import type { IEnvironment, IValidateBridgeUrlResponse } from '@novu/shared'; import { get, post } from './api.client'; export const getBridgeHealthCheck = async ({ environment }: { environment: IEnvironment }) => { const { data } = await get<{ data: HealthCheck }>('/bridge/status', { environment }); return data; }; export const validateBridgeUrl = async ({ bridgeUrl, environment, }: { bridgeUrl: string; environment: IEnvironment; }) => { const { data } = await post<{ data: IValidateBridgeUrlResponse }>('/bridge/validate', { environment, body: { bridgeUrl }, }); return data; };