({ userId, showDarkTheme })
| 1326 | } |
| 1327 | |
| 1328 | public static async toggleTheme({ userId, showDarkTheme }) { |
| 1329 | if (!userId) { |
| 1330 | throw new Error('Bad data.'); |
| 1331 | } |
| 1332 | |
| 1333 | await this.updateOne({ _id: userId }, { showDarkTheme: !!showDarkTheme }); |
| 1334 | } |
| 1335 | |
| 1336 | public static async pinDiscussion({ userId, discussionId }) { |
| 1337 | if (!userId || !discussionId) { |
nothing calls this directly
no outgoing calls
no test coverage detected