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

Method getList

api/server/models/Comment.ts:124–130  ·  view source on GitHub ↗
({ userId, discussionId })

Source from the content-addressed store, hash-verified

122
123class CommentClass extends mongoose.Model {
124 public static async getList({ userId, discussionId }) {
125 await this.checkPermission({ userId, discussionId });
126
127 const filter = { discussionId };
128
129 return this.find(filter).sort({ createdAt: 1 }).setOptions({ lean: true });
130 }
131
132 // add arguments: teamId, socketId
133 public static async addOrEdit({ content, discussionId, teamId, userId, id, files }) {

Callers

nothing calls this directly

Calls 1

checkPermissionMethod · 0.95

Tested by

no test coverage detected