mirror of
https://github.com/wassname/talk.git
synced 2026-07-11 13:32:09 +08:00
Merge branch 'next' into next-respect
This commit is contained in:
@@ -422,6 +422,30 @@ export async function retrieveCommentAssetConnection(
|
||||
return retrieveConnection(input, query);
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieveCommentUserConnection returns a Connection<Comment> for a given User's
|
||||
* comments.
|
||||
*
|
||||
* @param db database connection
|
||||
* @param userID the User id for the comment to retrieve
|
||||
* @param input connection configuration
|
||||
*/
|
||||
export async function retrieveCommentUserConnection(
|
||||
db: Db,
|
||||
tenantID: string,
|
||||
userID: string,
|
||||
input: ConnectionInput
|
||||
) {
|
||||
// Create the query.
|
||||
const query = new Query(collection(db)).where({
|
||||
tenant_id: tenantID,
|
||||
author_id: userID,
|
||||
});
|
||||
|
||||
// Return a connection for the comments query.
|
||||
return retrieveConnection(input, query);
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieveConnection returns a Connection<Comment> for the given input and
|
||||
* Query.
|
||||
|
||||
Reference in New Issue
Block a user