Skip to content

Commit

Permalink
Prettier and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrancis committed Aug 16, 2024
1 parent 3713d6e commit 0882e05
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 170 deletions.
6 changes: 3 additions & 3 deletions src/controllers/well-known_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ function build(): express.Router {
const secure = request.secure;

// Get a Thing Description of the gateway
let td = Gateway.getDescription(host, secure);
const td = Gateway.getDescription(host, secure);

// Add a link to root as the canonical URL of the Thing Description
if (td.links === undefined) {
if (typeof td.links === 'undefined') {
td.links = [];
}
td.links.push({
rel: 'canonical',
href: '/',
type: 'application/td+json'
type: 'application/td+json',
});

// Send the Thing Description in response
Expand Down
Loading

0 comments on commit 0882e05

Please sign in to comment.