mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Webatrice: KnownHosts component (#4456)
* refactor dexie services for future schema updates Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
37879c4255
commit
6ce346af4a
54 changed files with 1381 additions and 1291 deletions
22
webclient/src/services/dexie/DexieDTOs/SettingDTO.ts
Normal file
22
webclient/src/services/dexie/DexieDTOs/SettingDTO.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { Setting } from 'types';
|
||||
|
||||
import { dexieService } from '../DexieService';
|
||||
|
||||
export class SettingDTO extends Setting {
|
||||
constructor(user) {
|
||||
super();
|
||||
|
||||
this.user = user;
|
||||
this.autoConnect = false;
|
||||
}
|
||||
|
||||
save() {
|
||||
return dexieService.settings.put(this);
|
||||
}
|
||||
|
||||
static get(user) {
|
||||
return dexieService.settings.where('user').equalsIgnoreCase(user).first();
|
||||
}
|
||||
};
|
||||
|
||||
dexieService.settings.mapToClass(SettingDTO);
|
||||
Loading…
Add table
Add a link
Reference in a new issue