diff --git a/packages/services/adoption/src/controllers/petDetails.ts b/packages/services/adoption/src/controllers/petDetails.ts index ea7fb3a..6095ab7 100644 --- a/packages/services/adoption/src/controllers/petDetails.ts +++ b/packages/services/adoption/src/controllers/petDetails.ts @@ -14,6 +14,15 @@ const petDetails = async (req: Request, res: Response, next: NextFunction) => { }, }) + + if (!pet) { + return res.status(404).json({ message: "Pet not found" }); + } + + res.status(200).json({ + message: "Pet fetched successfully", + data: pet, + }) } catch (error) { next(error); } diff --git a/packages/services/analytics/package.json b/packages/services/cart/package.json similarity index 100% rename from packages/services/analytics/package.json rename to packages/services/cart/package.json diff --git a/packages/services/analytics/src/app.ts b/packages/services/cart/src/app.ts similarity index 100% rename from packages/services/analytics/src/app.ts rename to packages/services/cart/src/app.ts diff --git a/packages/services/analytics/src/controllers/index.ts b/packages/services/cart/src/controllers/index.ts similarity index 100% rename from packages/services/analytics/src/controllers/index.ts rename to packages/services/cart/src/controllers/index.ts diff --git a/packages/services/analytics/src/controllers/login.ts b/packages/services/cart/src/controllers/login.ts similarity index 100% rename from packages/services/analytics/src/controllers/login.ts rename to packages/services/cart/src/controllers/login.ts diff --git a/packages/services/analytics/src/controllers/register.ts b/packages/services/cart/src/controllers/register.ts similarity index 100% rename from packages/services/analytics/src/controllers/register.ts rename to packages/services/cart/src/controllers/register.ts diff --git a/packages/services/analytics/src/controllers/utill.ts b/packages/services/cart/src/controllers/utill.ts similarity index 100% rename from packages/services/analytics/src/controllers/utill.ts rename to packages/services/cart/src/controllers/utill.ts diff --git a/packages/services/analytics/src/index.ts b/packages/services/cart/src/index.ts similarity index 100% rename from packages/services/analytics/src/index.ts rename to packages/services/cart/src/index.ts diff --git a/packages/services/analytics/src/routes/index.ts b/packages/services/cart/src/routes/index.ts similarity index 100% rename from packages/services/analytics/src/routes/index.ts rename to packages/services/cart/src/routes/index.ts diff --git a/packages/services/analytics/src/utils/error.ts b/packages/services/cart/src/utils/error.ts similarity index 100% rename from packages/services/analytics/src/utils/error.ts rename to packages/services/cart/src/utils/error.ts diff --git a/packages/services/analytics/src/utils/index.ts b/packages/services/cart/src/utils/index.ts similarity index 100% rename from packages/services/analytics/src/utils/index.ts rename to packages/services/cart/src/utils/index.ts diff --git a/packages/services/analytics/src/utils/prisma.ts b/packages/services/cart/src/utils/prisma.ts similarity index 100% rename from packages/services/analytics/src/utils/prisma.ts rename to packages/services/cart/src/utils/prisma.ts diff --git a/packages/services/analytics/src/utils/schemas.ts b/packages/services/cart/src/utils/schemas.ts similarity index 100% rename from packages/services/analytics/src/utils/schemas.ts rename to packages/services/cart/src/utils/schemas.ts diff --git a/packages/services/analytics/tsconfig.json b/packages/services/cart/tsconfig.json similarity index 100% rename from packages/services/analytics/tsconfig.json rename to packages/services/cart/tsconfig.json