mirror of
https://github.com/streamwall/streamwall.git
synced 2025-12-06 01:45:37 -05:00
Add missing file
This commit is contained in:
17
packages/streamwall/src/main/storage.ts
Normal file
17
packages/streamwall/src/main/storage.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { Low } from 'lowdb'
|
||||
import { JSONFilePreset } from 'lowdb/node'
|
||||
|
||||
export interface StreamwallStoredData {
|
||||
stateDoc: string
|
||||
}
|
||||
|
||||
const defaultData: StreamwallStoredData = {
|
||||
stateDoc: '',
|
||||
}
|
||||
|
||||
export type StorageDB = Low<StreamwallStoredData>
|
||||
|
||||
export async function loadStorage(dbPath: string) {
|
||||
const db = await JSONFilePreset<StreamwallStoredData>(dbPath, defaultData)
|
||||
return db
|
||||
}
|
||||
Reference in New Issue
Block a user