(key: string, defaultValue?: string)
| 188 | } |
| 189 | |
| 190 | static async get(key: string, defaultValue?: string): Promise<string> { |
| 191 | await this.init(); |
| 192 | if (!this.db) return defaultValue || DEFAULT_CONFIG[key] || ""; |
| 193 | const value = this.db.data[key]; |
| 194 | return value ?? defaultValue ?? DEFAULT_CONFIG[key] ?? ""; |
| 195 | } |
| 196 | |
| 197 | static async set(key: string, value: string): Promise<boolean> { |
| 198 | await this.init(); |
no test coverage detected