Skip to content

Commit

Permalink
Resolve Windows, node 18 test issues with api
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaquu committed Jan 16, 2025
1 parent 38aa42d commit b897d85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module.exports = function (RED: NodeAPI) {
'/nrchkb/service/types',
RED.auth.needsPermission('nrchkb.read'),
(_req: express.Request, res: express.Response) => {
res.setHeader('Content-Type', 'application/json')
res.json(serviceData)
}
)
Expand Down Expand Up @@ -142,6 +143,7 @@ module.exports = function (RED: NodeAPI) {
'/nrchkb/info',
RED.auth.needsPermission('nrchkb.read'),
(_req: express.Request, res: express.Response) => {
res.setHeader('Content-Type', 'application/json')
res.json({
version: xyzVersion,
experimental,
Expand Down Expand Up @@ -342,6 +344,7 @@ module.exports = function (RED: NodeAPI) {
'/nrchkb/config',
RED.auth.needsPermission('nrchkb.read'),
async (_req: express.Request, res: express.Response) => {
res.setHeader('Content-Type', 'application/json')
res.json({
customCharacteristics: await getCustomCharacteristics(),
})
Expand Down Expand Up @@ -392,6 +395,7 @@ module.exports = function (RED: NodeAPI) {
'/nrchkb/accessory/categories',
RED.auth.needsPermission('nrchkb.read'),
(_req: express.Request, res: express.Response) => {
res.setHeader('Content-Type', 'application/json')
res.json(accessoryCategoriesData)
}
)
Expand Down

0 comments on commit b897d85

Please sign in to comment.