Determining location with restrictions disabled, cleaned up.
This commit is contained in:
+3
-3
@@ -31,7 +31,7 @@ export async function fetchMoviesApi(req, res) {
|
||||
} = await fetchMovies(await curateMoviesQuery(req.query), {
|
||||
page: Number(req.query.page) || 1,
|
||||
limit: Number(req.query.limit) || 30,
|
||||
}, req.user, { restriction: req.restriction });
|
||||
}, req.user, { restriction: req.geo.restriction });
|
||||
|
||||
res.send({
|
||||
movies,
|
||||
@@ -45,7 +45,7 @@ export async function fetchMoviesApi(req, res) {
|
||||
}
|
||||
|
||||
export async function fetchMovieApi(req, res) {
|
||||
const [movie] = await fetchMoviesById([Number(req.params.movieId)], { reqUser: req.user }, { restriction: req.restriction });
|
||||
const [movie] = await fetchMoviesById([Number(req.params.movieId)], { reqUser: req.user }, { restriction: req.geo.restriction });
|
||||
|
||||
if (!movie) {
|
||||
throw new HttpError(`No movie with ID ${req.params.movieId} found`, 404);
|
||||
@@ -135,7 +135,7 @@ export async function fetchMoviesGraphql(query, req) {
|
||||
page: query.page || 1,
|
||||
limit: query.limit || 30,
|
||||
aggregate: false,
|
||||
}, req.user, { restriction: req.restriction });
|
||||
}, req.user, { restriction: req.geo.restriction });
|
||||
|
||||
return {
|
||||
nodes: movies,
|
||||
|
||||
Reference in New Issue
Block a user