Commit Graph

104 Commits

Author SHA1 Message Date
KevinMidboe ed07c77b13 Updated files with tripple === and some linting issues. 2018-05-06 18:23:29 +02:00
KevinMidboe 18359f442c Mapped results in tmdb now returns the complete json object so not needed to be created before sent. When getting all requested movies and shows it is now possible to only get one page at a time. 2018-03-20 21:17:41 +01:00
KevinMidboe 996295b1fe Removed the id parameter, not used. 2018-03-20 20:14:44 +01:00
KevinMidboe 8fbd0eb9d8 Also unpacks the value of username before passing it to searchHistory. 2018-03-08 10:33:04 +01:00
KevinMidboe 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
KevinMidboe 1a4aefda14 Get the user variable from req not req.headers 2018-03-07 18:12:21 +01:00
KevinMidboe 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
KevinMidboe ab2d3c6756 Renamed function name and now returns 500 error when a problem is found. 2018-03-07 14:57:18 +01:00
KevinMidboe ba96e27c43 Alongside the token the value of admin state is also sent. 2018-03-07 01:35:40 +01:00
KevinMidboe fac9e0e425 Added a endpoint to fetch a random emoji. 2018-03-06 22:02:32 +01:00
KevinMidboe 02c36d041a Removed console.log and fixed docstring comment. 2018-03-06 19:30:11 +01:00
KevinMidboe 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
KevinMidboe ca146d77bc Fixed error message 2018-03-06 19:25:33 +01:00
KevinMidboe cede376349 Was not using the registered loggedInUser variable, but one passed by client 2018-03-06 19:24:58 +01:00
KevinMidboe e11dfc7712 Renamed class name. 2018-03-06 19:23:11 +01:00
KevinMidboe 1a693ef92f Our new controller for getting a users requested items. 2018-03-06 19:21:55 +01:00
KevinMidboe 08b373cba0 Response results are now saved in the object results instead of torrents 2018-02-26 19:58:54 +01:00
KevinMidboe ec0923f1c0 Can now filter the response by status. 2018-02-26 17:17:37 +01:00
KevinMidboe 34982c14fe Linted all controllers 2018-02-07 13:51:57 +01:00
KevinMidboe af64a4e28a Removed and clean up function and formatting. 2018-02-05 22:48:41 +01:00
KevinMidboe cefbb5e41c Added length of elements in return statement as total_results in api response. 2018-02-05 13:44:13 +01:00
KevinMidboe e417fedece Now follows our airbnb linting schema. 2017-10-26 14:52:00 +02:00
KevinMidboe 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
KevinMidboe 7069db8901 Now checks for loggedinuser header variable and passes it to sendRequest. 2017-10-23 15:32:49 +02:00
KevinMidboe 2d986eb5b3 Removed unused controllers 2017-10-23 15:06:22 +02:00
KevinMidboe 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
KevinMidboe 1925c2a5e3 Changed the variable for saving to searchHistory to be set when user is not false. 2017-10-22 18:04:20 +02:00
KevinMidboe 354e06a963 Removed searchHistory from tmdb class. 2017-10-22 17:03:40 +02:00
KevinMidboe 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
KevinMidboe 6574c087bc Added user history saving and that tmdb now gets to use cache. 2017-10-22 17:01:26 +02:00
KevinMidboe d20ac6470f Was a missing ) 2017-10-22 14:18:38 +02:00
KevinMidboe 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
KevinMidboe 1b29a08ce8 Removed a unused comment 2017-10-22 14:10:25 +02:00
KevinMidboe 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
KevinMidboe b6b9c790e9 Errors. Removed a return from within a resolve and a stray { in addMagnet. 2017-10-21 15:33:40 +02:00
KevinMidboe 5a24837163 Controller for adding magnets from post body magnet variable. 2017-10-21 15:28:13 +02:00
KevinMidboe a6d00714d6 Inputs a query, page and type and will search the bay for the query and return it as a json objec.t 2017-10-21 12:28:21 +02:00
KevinMidboe 67d343e446 Added endpoint for searching the bay 2017-10-21 10:01:16 +02:00
KevinMidboe 307a8352a3 Now takes both id and type because there is two different sets of id pools, and need to select the corrent one. 2017-10-06 15:37:09 +02:00
KevinMidboe 650c2603e4 Changed the input path of requestRepo 2017-10-06 15:16:45 +02:00
KevinMidboe fb479e7a37 Renamed function in requestRepo to updateRequestedById 2017-10-06 15:14:31 +02:00
KevinMidboe 61c242b5eb Passes the id from request parameter and status we want to change to from the request body. 2017-10-06 15:03:47 +02:00
KevinMidboe 7e27e19a0d Added more strict header allowence and was a error where endpoints for user was not using router, but app. 2017-10-06 12:12:21 +02:00
KevinMidboe 5fbedeb4b2 Misspelled User-Agent, when should have been user-agent. 2017-10-03 16:26:03 +02:00
KevinMidboe a819a4bbf3 Now passes the user agent that is making the post request (requesting content) so it can be saved in the db. 2017-10-03 16:11:15 +02:00
KevinMidboe a8166bcad9 Removed unused console. 2017-09-27 17:56:36 +02:00
KevinMidboe 149b05ef28 Calling function for fetching all the requested items. 2017-09-27 17:55:07 +02:00
KevinMidboe 698d2d6072 Created endpoints for user tasks like login, register and a test endpoint history. A test for checking that session token works as expected. 2017-09-27 16:19:02 +02:00
KevinMidboe daa9a7749e Now also the ip address is passed to the sendRequest function in requestRepository so that the requesters ip address can be logged in the database. 2017-09-26 20:43:56 +02:00
KevinMidboe ae66e9a684 Changed variable name from movie to searchResult and now checks if the result list in the return JSON object is empty before sending a result back to client. 2017-09-20 10:25:01 +02:00