Determining location with restrictions disabled, cleaned up.

This commit is contained in:
2026-07-23 05:34:28 +02:00
parent 4c48700086
commit 77b27a56f7
28 changed files with 590 additions and 71 deletions

View File

@@ -70,7 +70,7 @@ async function fetchScenesApi(req, res) {
page: Number(req.query.page) || 1,
limit: Number(req.query.limit) || 30,
}, req.user, {
restriction: req.restriction,
restriction: req.geo.restriction,
});
res.send({
@@ -254,7 +254,7 @@ export async function fetchScenesGraphql(query, req) {
}
async function fetchSceneApi(req, res) {
const [scene] = await fetchScenesById([Number(req.params.sceneId)], { reqUser: req.user }, { restriction: req.restriction });
const [scene] = await fetchScenesById([Number(req.params.sceneId)], { reqUser: req.user }, { restriction: req.geo.restriction });
if (!scene) {
throw new HttpError(`No scene with ID ${req.params.sceneId} found`, 404);
@@ -267,7 +267,7 @@ export async function fetchScenesByIdGraphql(query, req) {
const scenes = await fetchScenesById([].concat(query.id, query.ids).filter(Boolean), {
reqUser: req.user,
includePartOf: true,
restriction: req.restriction,
restriction: req.geo.restriction,
});
if (query.ids) {