Compare commits

..

1 Commits

Author SHA1 Message Date
Alexa a07360ee3f ci(release): grant contents:write to the release workflow
The workflow creates a GitHub release and uploads assets, which needs the contents:write token scope. Declaring it per-workflow (matching release-launcher.yml on main) lets the repo keep a read-only default GITHUB_TOKEN.
2026-06-16 11:56:17 +03:00
+1 -15
View File
@@ -1,20 +1,6 @@
import { clearSession, getToken, notifyAuthChange } from './auth'; import { clearSession, getToken, notifyAuthChange } from './auth';
const API_BASE = adminApiBase(); const API_BASE = '/api/admin/v1';
function adminApiBase(): string {
if (typeof window === 'undefined') return '/api/admin/v1';
const marker = '/__dn/admin';
const path = window.location.pathname;
const lower = path.toLowerCase();
const markerAt = lower.indexOf(marker);
if (markerAt >= 0) {
return path.slice(0, markerAt + marker.length) + '/api/admin/v1';
}
return '/api/admin/v1';
}
export class ApiError extends Error { export class ApiError extends Error {
constructor(public status: number, message: string, public body?: unknown) { constructor(public status: number, message: string, public body?: unknown) {