You've already forked AstralRinth
forked from didirus/AstralRinth
87c86c7d0d
* Reapply "fix: start swapping useBaseFetch usages to api-client" This reverts commit f4f33db7019ea861addb2c66c204d736800b7b6c. * fix: bugs * fix: analytics * fix: lint
23 lines
627 B
TypeScript
23 lines
627 B
TypeScript
import { AbstractModule } from '../../../core/abstract-module'
|
|
import type { Labrinth } from '../types'
|
|
|
|
export class LabrinthGlobalsInternalModule extends AbstractModule {
|
|
public getModuleID(): string {
|
|
return 'labrinth_globals_internal'
|
|
}
|
|
|
|
/**
|
|
* Get configured global non-secret variables for this backend instance
|
|
*
|
|
* @returns Promise resolving to the global configuration
|
|
*/
|
|
public async get(): Promise<Labrinth.Globals.Internal.Globals> {
|
|
return this.client.request<Labrinth.Globals.Internal.Globals>(`/globals`, {
|
|
api: 'labrinth',
|
|
version: 'internal',
|
|
method: 'GET',
|
|
skipAuth: true,
|
|
})
|
|
}
|
|
}
|