This commit is contained in:
@@ -11,17 +11,12 @@ export const POST: APIRoute = async ({ request, locals }) => {
|
||||
const body = await request.json();
|
||||
const description = body.description || "";
|
||||
const clientId = body.clientId;
|
||||
const categoryId = body.categoryId;
|
||||
const tags = body.tags || [];
|
||||
|
||||
if (!clientId) {
|
||||
return new Response("Client is required", { status: 400 });
|
||||
}
|
||||
|
||||
if (!categoryId) {
|
||||
return new Response("Category is required", { status: 400 });
|
||||
}
|
||||
|
||||
const runningEntry = await db
|
||||
.select()
|
||||
.from(timeEntries)
|
||||
@@ -47,7 +42,6 @@ export const POST: APIRoute = async ({ request, locals }) => {
|
||||
const validation = await validateTimeEntryResources({
|
||||
organizationId: member.organizationId,
|
||||
clientId,
|
||||
categoryId,
|
||||
tagIds: tags,
|
||||
});
|
||||
|
||||
@@ -63,7 +57,6 @@ export const POST: APIRoute = async ({ request, locals }) => {
|
||||
userId: locals.user.id,
|
||||
organizationId: member.organizationId,
|
||||
clientId,
|
||||
categoryId,
|
||||
startTime,
|
||||
description,
|
||||
isManual: false,
|
||||
|
||||
Reference in New Issue
Block a user