(key: string)
| 102 | |
| 103 | // 删除配置 |
| 104 | static delete(key: string): void { |
| 105 | this.init(); |
| 106 | if (!this.db) return; |
| 107 | |
| 108 | try { |
| 109 | const stmt = this.db.prepare("DELETE FROM config WHERE key = ?"); |
| 110 | stmt.run(key); |
| 111 | } catch (error) { |
| 112 | console.error("删除Komari配置失败:", error); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // 关闭数据库连接 |
| 117 | static close(): void { |
no test coverage detected