mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
fixed issue type not being communicated during creation
This commit is contained in:
@@ -7,9 +7,10 @@ export async function createIssue(
|
||||
title: string,
|
||||
description: string,
|
||||
creatorId: number,
|
||||
status: string,
|
||||
type: string,
|
||||
sprintId?: number,
|
||||
assigneeIds?: number[],
|
||||
status?: string,
|
||||
) {
|
||||
// prevents two issues with the same unique number
|
||||
return await db.transaction(async (tx) => {
|
||||
@@ -31,7 +32,8 @@ export async function createIssue(
|
||||
number: nextNumber,
|
||||
creatorId,
|
||||
sprintId,
|
||||
...(status && { status }),
|
||||
status,
|
||||
type,
|
||||
})
|
||||
.returning();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export default async function issueCreate(req: AuthedRequest) {
|
||||
const parsed = await parseJsonBody(req, IssueCreateRequestSchema);
|
||||
if ("error" in parsed) return parsed.error;
|
||||
|
||||
const { projectId, title, description = "", status, assigneeIds, sprintId } = parsed.data;
|
||||
const { projectId, title, description = "", status, assigneeIds, sprintId, type } = parsed.data;
|
||||
|
||||
const project = await getProjectByID(projectId);
|
||||
if (!project) {
|
||||
@@ -51,9 +51,10 @@ export default async function issueCreate(req: AuthedRequest) {
|
||||
title,
|
||||
description,
|
||||
req.userId,
|
||||
status,
|
||||
type,
|
||||
sprintId ?? undefined,
|
||||
assigneeIds,
|
||||
status,
|
||||
);
|
||||
|
||||
return Response.json(issue);
|
||||
|
||||
Reference in New Issue
Block a user