Skip to content

Commit

Permalink
Logout feature (#26) (#46)
Browse files Browse the repository at this point in the history
* Logout feature (#26)

* [#187584914]added logout feature

* [starts #187584914] added logout feature

* [finishes#187584914] logout feature

* [delivers##187584914] updated readme & swagger.json

* [delivers##187584914] updated readme & swagger.json

* [deliveres #187584914] logout features completed

* [deliveres #187584914] logout features completed

* [delivers #187584914] finished logout feature

* fixing bugs

* rebased

---------

Co-authored-by: Solange Duhimbaze Ihirwe <[email protected]>
  • Loading branch information
2 people authored and elvis mugisha committed Jun 5, 2024
1 parent c0fbf6f commit 7952b8e
Show file tree
Hide file tree
Showing 25 changed files with 1,130 additions and 484 deletions.
Binary file added .DS_Store
Binary file not shown.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Our e-commerce web application server, developed by Team Ninjas, facilitates smo

## HOSTED SERVER URL

[https://e-commerce-ninjas-backend.onrender.com/](https://e-commerce-ninjas-backend.onrender.com/)
[https://e-commerce-ninjas-platform-backend.onrender.com/](https://e-commerce-ninjas-platform-backend.onrender.com/)

#### Hosted Swagger Documentation

[https://e-commerce-ninjas-backend.onrender.com/api-docs](https://e-commerce-ninjas-backend.onrender.com/api-docs)
[https://e-commerce-ninjas-platform-backend.onrender.com/api-docs](https://e-commerce-ninjas-platform-backend.onrender.com/api-docs)

#### Github Repository For E-Commerce-Ninjas Backend

Expand All @@ -28,9 +28,14 @@ Our e-commerce web application server, developed by Team Ninjas, facilitates smo
- Verification Email Endpoint
- Resend verification Endpoint
- Login Endpoint
- Admin get users Endpoint
- Admin get user Endpoint
- Admin Update Status Endpoint
- Admin Update Role Endpoint
- Logout Endpoint
- Update User Profile Endpoint
- Get User Profile Endpoint
- Login Via google account

## TABLE OF API ENDPOINTS SPECIFICATION AND DESCRIPTION

Expand All @@ -42,11 +47,14 @@ Our e-commerce web application server, developed by Team Ninjas, facilitates smo
| 3 | GET | /api/auth/verify-email/:token | 200 OK | public | Verifying email |
| 4 | POST | /api/auth/send-verify-email | 200 OK | public | Resend verification email |
| 5 | POST | /api/auth/login | 200 OK | public | Login with Email and Password |
| 6 | PUT | /api/users/admin-update-user-status/:id | 200 OK | private | Admin Update Status Endpoint |
| 7 | PUT | /api/users/admin-update-role/:id | 200 OK | private | Admin Update Role Endpoint |
| 8 | POST | /api/auth/logout | 200 OK | private | Logout user |
| 9 | GET | /api/auth/google | 200 OK | public | Login Via google account |

| 6 | GET | /api/user/admin-get-users | 200 OK | private | Admin get all users Endpoint |
| 7 | GET | /api/user/admin-get-user/:id | 200 OK | private | Admin get user Endpoint |
| 8 | PUT | /api/user/admin-update-user-status/:id | 200 OK | private | Admin Update Status Endpoint |
| 9 | PUT | /api/user/admin-update-role/:id | 200 OK | private | Admin Update Role Endpoint |
| 10 | POST | /api/auth/logout | 200 OK | private | Logout user |
| 11 | PUT | /api/user/user-update-profile | 200 OK | private | Update User Profile Endpoint |
| 11 | GET | /api/user/user-get-profile | 200 OK | private | Get User Profile Endpoint |
| 12 | GET | /api/auth/google | 200 OK | public | Login Via google account |
## INSTALLATION

1. Clone the repository:
Expand Down Expand Up @@ -122,4 +130,4 @@ Our e-commerce web application server, developed by Team Ninjas, facilitates smo
9. Delete the Migration:
```sh
npm run deleteAllTables
```
```
169 changes: 169 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "cross-env NODE_ENV=test npm run deleteAllTables && cross-env NODE_ENV=test npm run createAllTables && cross-env NODE_ENV=test npm run createAllSeeders && nyc cross-env NODE_ENV=test mocha --require ts-node/register 'src/**/*.spec.ts' --timeout 600000 --exit",
"test-local": "cross-env NODE_ENV=development npm run deleteAllTables && cross-env NODE_ENV=development npm run createAllTables && cross-env NODE_ENV=development npm run createAllSeeders && nyc cross-env NODE_ENV=development mocha --require ts-node/register 'src/**/*.spec.ts' --timeout 600000 --exit",
"coveralls": "nyc --reporter=lcov --reporter=text-lcov npm test | coveralls",
"coverage": "cross-env NODE_ENV=test nyc mocha --require ts-node/register 'src/**/*.spec.ts' --timeout 600000 --exit",
"coverage": "cross-env NODE_ENV=test npm run deleteAllTables && cross-env NODE_ENV=test npm run createAllTables && cross-env NODE_ENV=test npm run createAllSeeders && nyc cross-env NODE_ENV=test mocha --require ts-node/register 'src/**/*.spec.ts' --timeout 600000 --exit",
"lint": "eslint . --ext .ts",
"lint-staged": "lint-staged",
"prepare": "husky",
Expand All @@ -35,7 +35,8 @@
"exclude": [
"src/index.spec.ts",
"src/databases/**/*.*",
"src/modules/**/test/*.spec.ts"
"src/modules/**/test/*.spec.ts",
"src/services/googleAuth.ts"
],
"reporter": [
"html",
Expand Down Expand Up @@ -91,6 +92,7 @@
"swagger-ui-express": "^5.0.0",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"twilio": "^5.1.0",
"typescript": "^5.4.5"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 7952b8e

Please sign in to comment.