Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/replay/backend/storage/SettingsDb.ts
1030 views
1
import BaseDb from './BaseDb';
2
import ISettings from '~shared/interfaces/ISettings';
3
4
const defaultSettings = {
5
theme: 'secret-agent-light',
6
themeAuto: true,
7
};
8
9
export default class SettingsDb extends BaseDb<ISettings> {
10
constructor() {
11
super('Settings', { ...defaultSettings });
12
}
13
14
public fetch() {
15
return { ...this.allData };
16
}
17
18
public update(newData: ISettings) {
19
Object.assign(this.allData, newData);
20
}
21
}
22
23
export { ISettings };
24
25