mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 18:35:07 +03:00
22 lines
556 B
TypeScript
22 lines
556 B
TypeScript
import { API_URL } from 'lib/constants'
|
|
import { IRootStore } from '../RootStore'
|
|
import DatabaseStore, { IDatabaseStore } from './DatabaseStore'
|
|
|
|
export interface IAppStore {
|
|
database: IDatabaseStore
|
|
}
|
|
export default class AppStore implements IAppStore {
|
|
rootStore: IRootStore
|
|
database: DatabaseStore
|
|
|
|
baseUrl: string
|
|
|
|
constructor(rootStore: IRootStore) {
|
|
this.rootStore = rootStore
|
|
this.baseUrl = API_URL || '/api'
|
|
|
|
const headers: any = {}
|
|
this.database = new DatabaseStore(rootStore, `${this.baseUrl}/database`, headers)
|
|
}
|
|
}
|