Commit Graph

78 Commits

Author SHA1 Message Date
996295b1fe Removed the id parameter, not used. 2018-03-20 20:14:44 +01:00
8fbd0eb9d8 Also unpacks the value of username before passing it to searchHistory. 2018-03-08 10:33:04 +01:00
127db8b2fe Errors when we have a user that was not signed in. Fixed to unpack the username value first, then pass it to the function. 2018-03-08 10:32:19 +01:00
1a4aefda14 Get the user variable from req not req.headers 2018-03-07 18:12:21 +01:00
453727db1b Fixed issue where the user was not being saved alongside the request. Also fixed what the list of requests are sorted by. 2018-03-07 15:35:55 +01:00
ab2d3c6756 Renamed function name and now returns 500 error when a problem is found. 2018-03-07 14:57:18 +01:00
27c95375e2 Reverted back to only be authenticated beacuse something wrong with getting the correct user. Will replace with admin check as middleware when fixed. 2018-03-07 01:37:42 +01:00
ba96e27c43 Alongside the token the value of admin state is also sent. 2018-03-07 01:35:40 +01:00
59b206bf2d Forgot a leading / 2018-03-06 22:13:53 +01:00
fac9e0e425 Added a endpoint to fetch a random emoji. 2018-03-06 22:02:32 +01:00
02c36d041a Removed console.log and fixed docstring comment. 2018-03-06 19:30:11 +01:00
7c4aeb48ab When registering a token is also returned so we dont need to sign in after registration. 2018-03-06 19:26:28 +01:00
ca146d77bc Fixed error message 2018-03-06 19:25:33 +01:00
cede376349 Was not using the registered loggedInUser variable, but one passed by client 2018-03-06 19:24:58 +01:00
e11dfc7712 Renamed class name. 2018-03-06 19:23:11 +01:00
1a693ef92f Our new controller for getting a users requested items. 2018-03-06 19:21:55 +01:00
2df734bb32 ADded endpoints for checking search history and the items a user has requested, both require authentication. Changed that searching for torrents now require being admin not just signed in. 2018-03-06 19:20:32 +01:00
e6a8515432 Now we can check if user is admin. This has to be set manually and now only is used for fetching torrents. 2018-03-06 19:12:21 +01:00
08b373cba0 Response results are now saved in the object results instead of torrents 2018-02-26 19:58:54 +01:00
ec0923f1c0 Can now filter the response by status. 2018-02-26 17:17:37 +01:00
93e1ef6d99 Linted app and server.js files. 2018-02-07 13:52:39 +01:00
58449fc753 Linted all middleware. 2018-02-07 13:52:08 +01:00
34982c14fe Linted all controllers 2018-02-07 13:51:57 +01:00
af64a4e28a Removed and clean up function and formatting. 2018-02-05 22:48:41 +01:00
44878a295c Merge branch 'api_fixes' of github.com:kevinmidboe/seasonedShows into api_fixes 2018-02-05 14:25:25 +01:00
9b0fa88a72 Changed docstring and removed the unused port variable. 2018-02-05 14:25:13 +01:00
77d7167fcb Changed so that one must not be auth to get requested elements. This might change. 2018-02-05 14:22:44 +01:00
cefbb5e41c Added length of elements in return statement as total_results in api response. 2018-02-05 13:44:13 +01:00
7d44f1518f Updated gitignore to ignore conf folder and deleted the contents of conf. 2017-12-01 10:57:28 +01:00
2fc9674548 Added some todos for routers/middleware and setup so that raven will be used for error handling and gets value from config file. 2017-11-04 18:11:44 +01:00
7cce61b3bb Setup for sentry. Need to add __DSN__ value manually. 2017-10-26 15:19:10 +02:00
e417fedece Now follows our airbnb linting schema. 2017-10-26 14:52:00 +02:00
80dcba2fba Merge pull request #54 from KevinMidboe/api_save-user-w-request
Api save user w request
2017-10-23 15:36:28 +02:00
7069db8901 Now checks for loggedinuser header variable and passes it to sendRequest. 2017-10-23 15:32:49 +02:00
2d986eb5b3 Removed unused controllers 2017-10-23 15:06:22 +02:00
40928a6e46 Added docstring 2017-10-23 14:59:58 +02:00
c48db517ac Created one function for searching for different tmdb lists. This replaces 4 endpoints so we have a single way of searching for lists. 2017-10-23 14:58:52 +02:00
1925c2a5e3 Changed the variable for saving to searchHistory to be set when user is not false. 2017-10-22 18:04:20 +02:00
d2d791f5b2 added loggedinuser as acceptable header. 2017-10-22 17:31:37 +02:00
354e06a963 Removed searchHistory from tmdb class. 2017-10-22 17:03:40 +02:00
cc8d9f0c50 Added docstring, removed a unused console.log and added better error handling for empty return statement.s 2017-10-22 17:03:16 +02:00
6574c087bc Added user history saving and that tmdb now gets to use cache. 2017-10-22 17:01:26 +02:00
d20ac6470f Was a missing ) 2017-10-22 14:18:38 +02:00
f89d81681a Added import for cache to initiate our tmdb class in the correct way, but still not implemented the actual cache lookup. 2017-10-22 14:14:29 +02:00
1b29a08ce8 Removed a unused comment 2017-10-22 14:10:25 +02:00
f57878813d Added Cache file for tmdb queries and controller check the cache and returns it if hit. This is to limit our request to a third party library. 2017-10-22 14:09:57 +02:00
b6b9c790e9 Errors. Removed a return from within a resolve and a stray { in addMagnet. 2017-10-21 15:33:40 +02:00
d1d204691a Changed from GET to POST 2017-10-21 15:28:32 +02:00
5a24837163 Controller for adding magnets from post body magnet variable. 2017-10-21 15:28:13 +02:00
4c7be51a61 Added endpoint for add and now user must be authenticated for both pirate endpoints. 2017-10-21 15:27:21 +02:00