fix: point dashboard API calls to api.pingql.com
This commit is contained in:
parent
841a852491
commit
9fb90d9ea8
|
|
@ -1,7 +1,7 @@
|
||||||
// PingQL Dashboard — shared utilities
|
// PingQL Dashboard — shared utilities
|
||||||
// Auth is now cookie-based. No localStorage needed.
|
// Auth is now cookie-based. No localStorage needed.
|
||||||
|
|
||||||
const API_BASE = window.location.origin;
|
const API_BASE = 'https://api.pingql.com';
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
window.location.href = '/dashboard/logout';
|
window.location.href = '/dashboard/logout';
|
||||||
|
|
@ -66,7 +66,7 @@ function watchAccount(onPing) {
|
||||||
|
|
||||||
async function connect() {
|
async function connect() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`/account/stream`, {
|
const res = await fetch(`${API_BASE}/account/stream`, {
|
||||||
credentials: 'same-origin',
|
credentials: 'same-origin',
|
||||||
signal: ac.signal,
|
signal: ac.signal,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue