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

Method pinDiscussion

api/server/models/User.ts:1336–1349  ·  view source on GitHub ↗
({ userId, discussionId })

Source from the content-addressed store, hash-verified

1334 }
1335
1336 public static async pinDiscussion({ userId, discussionId }) {
1337 if (!userId || !discussionId) {
1338 throw new Error('Bad data.');
1339 }
1340
1341 await this.updateOne(
1342 { _id: userId },
1343 {
1344 $push: {
1345 pinnedDiscussionIds: discussionId,
1346 },
1347 },
1348 );
1349 }
1350
1351 public static async unpinDiscussion({ userId, discussionId }) {
1352 if (!userId || !discussionId) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected