mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
create issue with assignee
This commit is contained in:
@@ -23,8 +23,10 @@ export default async function issueCreate(req: AuthedRequest) {
|
||||
|
||||
const title = url.searchParams.get("title") || "Untitled Issue";
|
||||
const description = url.searchParams.get("description") || "";
|
||||
const assigneeIdParam = url.searchParams.get("assigneeId");
|
||||
const assigneeId = assigneeIdParam ? Number(assigneeIdParam) : undefined;
|
||||
|
||||
const issue = await createIssue(project.id, title, description, req.userId);
|
||||
const issue = await createIssue(project.id, title, description, req.userId, assigneeId);
|
||||
|
||||
return Response.json(issue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user