Add safe mode #85
1 changed files with 7 additions and 3 deletions
|
@ -10,9 +10,13 @@ export default class CardSetupFunction {
|
|||
public static async Execute() {
|
||||
if (await Config.GetValue('safemode') == "true") return;
|
||||
|
||||
try {
|
||||
await this.ClearDatabase();
|
||||
await this.ReadSeries();
|
||||
await this.ReadCards();
|
||||
} catch {
|
||||
await Config.SetValue('safemode', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
private static async ClearDatabase() {
|
||||
|
|
Loading…
Reference in a new issue