import express from 'express' ; import buildingController from '../controllers/buildingController' ; const router = express . Router ( ) ; router . get ( '/locate' , buildingController . getBuildingsByLocation ) ; router . get ( '/reference' , buildingController . getBuildingsByReference ) ; router . get ( '/revision' , buildingController . getLatestRevisionId ) ; router . route ( '/:building_id.json' ) . get ( buildingController . getBuildingById ) . post ( buildingController . updateBuildingById ) ; router . get ( '/:building_id/uprns.json' , buildingController . getBuildingUPRNsById ) ; router . route ( '/:building_id/verify.json' ) . get ( buildingController . getUserVerifiedAttributes ) . post ( buildingController . verifyBuildingAttributes ) ; router . route ( '/:building_id/history.json' ) . get ( buildingController . getBuildingEditHistoryById ) ; export default router ;