Skip to content

Commit

Permalink
feat: add key feature and use bun instead of package.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunyawat Naunnak committed Aug 13, 2024
1 parent d6171e0 commit 5e72a29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/api/routers/parcel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ParcelGroupSchema,
ParcelTypeSchema,
} from "~/utils/constant";
import { BORROWING_STATUS } from "@prisma/client";
import { BORROWING_STATUS, PARCEL_TYPE } from "@prisma/client";

/**
* TRPC Router for handling parcel-related operations.
Expand Down Expand Up @@ -64,10 +64,10 @@ export const parcelRouter = createTRPCRouter({

return await ctx.db.parcel.findMany({
where:
isStudentInProject ?? isAdmin
? { available: true, type: "KEY" }
(isStudentInProject ?? isAdmin)
? { available: true, type: PARCEL_TYPE.KEY }
: projectId === "0000000000"
? { available: true, type: "KEY" }
? { available: true, type: PARCEL_TYPE.KEY }
: {
available: true,
NOT: {
Expand Down

0 comments on commit 5e72a29

Please sign in to comment.