Skip to content

abuhosain/sports-facility-backend

Repository files navigation

Backend with mongoose

sport faculty booking project

This project is created by mongoose and i am using zod for validation

Live link : https://sports-facility-booking3.vercel.app/

Code run

To deploy this project run

  npm run start:dev

Code error fix

To find and fix this project code error i am using eslint and prettier

  npm run lint
  npm run lint:fix

API Reference

Sign Up

  POST /api/auth/signup

Sign In

  POST /api/auth/signin

Create a Facility (Admin Only)

  POST /api/facility

Update a Facility (Admin Only)

 PUT /api/facility/:id

Delete a Facility - Soft Delete (Admin Only)

DELETE /api/facility/:id
Parameter Type Description
id string Required. Id of product to fetch

get all Facility

GEt /api/facility/

check all availity

GET /api/check-availability?date=2024-06-15

####  Create a Booking (User Only)

```http
POST /api/bookings

View All Bookings (Admin Only)

GET /api/bookings

View Bookings by User (User Only)

GET /api/bookings/user

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published