Skip to content

Commit

Permalink
[Task] #123, mapbox secret fetched
Browse files Browse the repository at this point in the history
  • Loading branch information
Type-Style committed Sep 6, 2024
1 parent e0f4bb3 commit eeabdab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/controller/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ router.get('/',
});


router.get('/maptoken',
isLoggedIn,
async function mapToken(req: Request, res: Response, next: NextFunction) {
const mapbox = process.env.MAPBOX;
if (!mapbox) { return createError(res, undefined, `Missing configuration, environment variable not defined`, next); }

res.json({ mapbox });
}
);


export default router;

0 comments on commit eeabdab

Please sign in to comment.