aps_webviewer_nodejs/routes/auth.js
David Friedrich 98e799b7df First
2024-11-08 07:51:28 +01:00

14 lines
318 B
JavaScript

const express = require('express');
const { getPublicToken } = require('../services/aps.js');
let router = express.Router();
router.get('/api/auth/token', async function (req, res, next) {
try {
res.json(await getPublicToken());
} catch (err) {
next(err);
}
});
module.exports = router;