Skip to content

Commit c5195db

Browse files
author
Mohammed Othman
authored
Merge pull request #28 from mohammedothman7/db-connect-fix
Added RAWG API key to code
2 parents da5f6ca + 0f642f7 commit c5195db

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

routes/games.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@ const { Games } = require("../database/models");
99
router.get("/", async (req, res, next) => {
1010
// try to get gamess object from api
1111
//console.log(req);
12-
const {
13-
page,
14-
page_size,
15-
ordering,
16-
dates,
17-
genres,
18-
parent_platforms,
19-
} = req.query;
12+
const { page, page_size, ordering, dates, genres, parent_platforms } =
13+
req.query;
2014

2115
//console.log(req.query);
2216
axios
2317
.get("https://api.rawg.io/api/games", {
2418
params: {
19+
key: process.env.RAWG_API_KEY,
2520
page,
2621
page_size,
2722
genres,

0 commit comments

Comments
 (0)