(userId: number)
| 198 | |
| 199 | static async getUserSettings(userId: number): Promise<UserSettings | null> { |
| 200 | if (!userId || isNaN(userId)) return null; |
| 201 | await this.init(); |
| 202 | return this.db?.data?.users?.[userId.toString()] ?? null; |
| 203 | } |
| 204 | |
| 205 | static async saveUserSettings(settings: UserSettings): Promise<boolean> { |
| 206 | if (!settings?.user_id) return false; |
| 207 | await this.init(); |
no test coverage detected