Skip to content

Commit

Permalink
Fix Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 20, 2024
1 parent 9037050 commit 99708f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/routes/overlays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ export default async function router(schema: Schema, config: Config) {
let url = config.API_URL + `/api/overlay/${overlay.id}/tiles/{z}/{x}/{y}`;
if (req.query.token) url = url + `?token=${req.query.token}`;

return res.json(TileJSON.json(overlay));
return res.json(TileJSON.json({
...overlay, url
}));
} catch (err) {
return Err.respond(err, res);
}
Expand All @@ -181,7 +183,7 @@ export default async function router(schema: Schema, config: Config) {
})
}, async (req, res) => {
try {
const user = await Auth.as_user(config, req, { token: true });
await Auth.as_user(config, req, { token: true });

const overlay = await config.cacher.get(Cacher.Miss(req.query, `overlay-${req.params.overlay}`), async () => {
return await config.models.Overlay.from(req.params.overlay);
Expand Down

0 comments on commit 99708f9

Please sign in to comment.