mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
patched security holes
This commit is contained in:
@@ -190,3 +190,11 @@ export async function getIssueAssigneeCount(issueId: number): Promise<number> {
|
||||
.where(eq(IssueAssignee.issueId, issueId));
|
||||
return result?.count ?? 0;
|
||||
}
|
||||
|
||||
export async function isIssueAssignee(issueId: number, userId: number): Promise<boolean> {
|
||||
const [assignee] = await db
|
||||
.select({ id: IssueAssignee.id })
|
||||
.from(IssueAssignee)
|
||||
.where(and(eq(IssueAssignee.issueId, issueId), eq(IssueAssignee.userId, userId)));
|
||||
return Boolean(assignee);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user