[deploy] Emit frontend bundle as ESM for browser
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 38s
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 38s
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.api = void 0;
|
||||
const store_js_1 = require("../state/store.js");
|
||||
import { getConfig } from '../state/store.js';
|
||||
function buildUrl(path, query) {
|
||||
const cfg = (0, store_js_1.getConfig)();
|
||||
const cfg = getConfig();
|
||||
const base = cfg?.baseApi || '';
|
||||
const url = new URL(path.startsWith('http') ? path : `${base}${path}`, window.location.origin);
|
||||
if (query) {
|
||||
@@ -35,7 +32,7 @@ async function request(path, options = {}) {
|
||||
}
|
||||
return (await res.text());
|
||||
}
|
||||
exports.api = {
|
||||
export const api = {
|
||||
me: () => request('/me'),
|
||||
guilds: () => request('/guilds'),
|
||||
overview: (guildId) => request(`/overview`, { query: { guildId } }),
|
||||
|
||||
Reference in New Issue
Block a user