MCPcopy Create free account
hub / github.com/async-labs/async / toggleTheme

Method toggleTheme

api/server/models/User.ts:1328–1334  ·  view source on GitHub ↗
({ userId, showDarkTheme })

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected