Skip to content

Commit

Permalink
add route for generate api key
Browse files Browse the repository at this point in the history
Signed-off-by: cbh778899 <[email protected]>
  • Loading branch information
cbh778899 committed Jul 31, 2024
1 parent 12d3e39 commit 252a065
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routes/token.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { Router } from "express";
import { generateAPIKey } from "../tools/generator.js";

export default function tokenRoute() {
const router = Router();

router.get('/api-key', (_, res)=>{
res.send({api_key: generateAPIKey()})
})

return router;
}

0 comments on commit 252a065

Please sign in to comment.