to run both of the repo just clone the repo and install node modules for both frontend and backend seperately and then run this in the root directory
npm start
due to time limit i am just documenting without formatting it as my normal template is is the first response in the docs
prefix: /
-
Success Result template
{ "result": "ok", "data": { } }
-
**Failed Result template **
status code:
400{ "result:": "error", "message": error_string }
User is created , send verification mail.
POST employee/createEmployee
Name | Type | Mandatory | Description |
---|---|---|---|
String | YES | User email | |
name | String | YES | full name of the user |
mobile | String | YES | phone number of the user |
city | String | YES | city name of the user |
-
Success Result
status code:
200{ "_id": "6288bee2c3d7793950d44940", "fullName": "faizan", "email": "faizanshaha1496@gmail.com", "mobile": "123132131", "password": "123456789", "city": "islamabad", "__v": 0 }
-
Failed Result
status code:
400{ "driver": true, "name": "MongoError", "index": 0, "code": 11000, "keyPattern": { "email": 1 }, "keyValue": { "email": "faizanshah1496@gmail.com" }, "errmsg": "E11000 duplicate key error collection: EmployeeDB.employees index: email_1 dup key: { email: \"faizanshah1496@gmail.com\" }" }
policy is created._
POST policy/addPolicy
Name | Type | Mandatory | Description |
---|---|---|---|
category | String | YES | FK of category |
policyNumber | String | YES | numebr of policy |
policyDescription | String | YES | description of policy |
-
Success Result
status code:
200{ "category": [ "6288a2378489ad1b54193f0d" ], "_id": "6288bfcbc3d7793950d44941", "policyNumber": "highCat3a", "policyDescription": "high policy cat3", "__v": 0 }
-
Failed Result
status code:
400{ errorMessage: errorMessage }