clean up some stuff, moved around other
This commit is contained in:
parent
117b535962
commit
5615049a15
16 changed files with 80 additions and 84 deletions
|
|
@ -1,6 +1,14 @@
|
|||
import { ensureWindowState } from '@app/utils';
|
||||
import { Configuration, OpenapiOtherApi } from './generated';
|
||||
export * from './generated'
|
||||
|
||||
ensureWindowState();
|
||||
|
||||
declare module 'ft_state' {
|
||||
interface State {
|
||||
client: OpenapiOtherApi;
|
||||
}
|
||||
}
|
||||
|
||||
const basePath = (() => {
|
||||
let u = new URL(location.href);
|
||||
|
|
@ -8,11 +16,9 @@ const basePath = (() => {
|
|||
u.hash = "";
|
||||
u.search = "";
|
||||
return u.toString().replace(/\/+$/, '');
|
||||
|
||||
})();
|
||||
|
||||
export const client = new OpenapiOtherApi(new Configuration({ basePath }));
|
||||
export default client;
|
||||
|
||||
Object.assign(window as any, { apiClient: client });
|
||||
|
||||
window.__state.client ??= client;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue