fixed css
This commit is contained in:
@@ -4,9 +4,20 @@
|
||||
// @LAYER: Infra-API
|
||||
|
||||
import { addToast } from './toasts.js';
|
||||
import { PUBLIC_WS_URL } from '$env/static/public';
|
||||
|
||||
const API_BASE_URL = '/api';
|
||||
|
||||
/**
|
||||
* Returns the WebSocket URL for a specific task, with fallback logic.
|
||||
* @param {string} taskId
|
||||
* @returns {string}
|
||||
*/
|
||||
export const getWsUrl = (taskId) => {
|
||||
const baseUrl = PUBLIC_WS_URL || `ws://${window.location.hostname}:8000`;
|
||||
return `${baseUrl}/ws/logs/${taskId}`;
|
||||
};
|
||||
|
||||
// [DEF:fetchApi:Function]
|
||||
// @PURPOSE: Generic GET request wrapper.
|
||||
// @PARAM: endpoint (string) - API endpoint.
|
||||
|
||||
Reference in New Issue
Block a user