This project already exist, but this time has been created with Web Api ASP.Net Core using C#
Link for the other project RentX;
Content created by Rocketseat;
Setup appsettings.Development.json or appsettings.json
- Setting Environment variables -> /API/appsettings.json
{ ...other code, "ConnectionStrings": { "DefaultConnection": "Server=localhost; Port=5432; User Id=postgres; Password=pass; Database=RentX" }, "Mail": { "Host": "smtp.gmail.com", "Email": "example@gmail.com", "Port": 587, "User": "example@gmail.com", "Password": "pass" }, "TokenKey": "super secret key" }
- API routes
- Users
- [GET] user -> /account
- [Authorize] -> Bearer token
- [GET] resend email confirmation link -> /account/resendEmailConfirmationLink
- Params -> email
- [POST] login -> /account/login
- Body -> email, password
- [POST] register -> /account/register
- Body -> displayName, username, email, password
- [POST] upload avatar -> /account/image
- [Authorize] -> Bearer token
- Body(form-data) -> File
- [POST] verify email -> /account/verifyEmail
- Params -> token, email
- [POST] refresh token -> /account/refreshToken
- [Authorize] -> Bearer token
- Headers -> Cookie -> refreshToken=...
- [GET] user -> /account
- Cars
- Car /car
- [GET] cars -> / - Params -> search1
- [POST] create car -> / - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Body -> plate, brand, model, color, year, fuel, transmission, doors, seats, pricePerDay, detail - maxSpeed, topSpeed, acceleration, weight, hp
- [PUT] update car -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Body -> brand, model, color, year, fuel, transmission, doors, seats, pricePerDay
- [DELETE] delete car -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin
- [GET] user favorite car -> /favorite - [Authorize] -> Bearer token
- Car details -> /details
- [GET] details -> /{plate}
- Car images -> /image
- [POST] upload image -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Body(form-data) -> File
- [POST] set main image -> /{plate}/setMain - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Params -> imageName
- [DELETE] delete image -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Params -> imageName
- Car appointments -> /appointments
- [POST] create appointment -> /{plate} - [Authorize] -> Bearer token - Body -> startDate, endDate
- [GET] user scheduled -> /scheduled - [Authorize] -> Bearer token
- [GET] between dates -> /between-dates - Params -> startDate, endDate, startPricePerDay, endPricePerDay, fuel, transmission
- [DELETE] delete appointment -> /{plate} - [Authorize] -> Bearer token
- Car /car
- Users
Bernardo Generoso @bernardogeneroso 💻 |
Rocketseat @Rocketseat 🚀 |
This project is under a license MIT.
Footnotes
-
This search work with brand and model ↩