Skip to content

Commit

Permalink
🔧 fixed api endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbalaguer committed Nov 19, 2020
1 parent 7302f40 commit 12794e8
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# PSGC (Philippine Standard Geographic Code)
API used for listing all the region, province, city, municipality, and barangay. All data came from <a href='psa.gov.ph'>Philippine Statistics Authority</a>. This API includes the total population for each regions etc. and other information.
API used for listing all the region, province, city, municipality, and barangay. All data came from <a href='https://psa.gov.ph' target='_blank'>Philippine Statistics Authority</a>. This API includes the total population for each regions etc. and other information.

# ENDPOINTS
```https://psgc-api.herokuapp.com```
REGION - ```/v1/region```
PROVINCE - ```/v1/province```
CITY - ```/v1/city```
MUNICIPALITY - ```/v1/municipality```
BARANGAY - ```/v1/barangay```
# SETUP
```$ npm install```

Expand Down
20 changes: 10 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const cors = require('cors');
const middlewares = require('./middlewares');

/* region */
const region = require('./api/region');
const region = require('./v1/region');
/* province */
const province = require('./api/province');
const province = require('./v1/province');
/* city */
const city = require('./api/city');
const city = require('./v1/city');
/* municipality */
const municipality = require('./api/municipality');
const municipality = require('./v1/municipality');
/* barangay */
const barangay = require('./api/barangay');
const barangay = require('./v1/barangay');

require('dotenv').config();

Expand Down Expand Up @@ -43,15 +43,15 @@ app.get('/', (req, res) => {
});

/* region */
app.use('/api/region', region);
app.use('/v1/region', region);
/* province */
app.use('/api/province', province);
app.use('/v1/province', province);
/* city */
app.use('/api/city', city);
app.use('/v1/city', city);
/* municipality */
app.use('/api/municipality', municipality);
app.use('/v1/municipality', municipality);
/* barangay */
app.use('/api/barangay', barangay);
app.use('/v1/barangay', barangay);

/* errorHandler middlerware */
app.use(middlewares.notFound);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 12794e8

Please sign in to comment.