Commit Graph

140 Commits

Author SHA1 Message Date
KevinMidboe e64c4d5d01 Lists are now reachable by movie or show / listname. Endpoints added & removed outdated comments. 2018-11-01 00:17:51 +01:00
KevinMidboe 22e57c03de Controller for movie and shows. Each have multiple small export functions; one for each list search type 2018-11-01 00:16:56 +01:00
KevinMidboe 4250b1bd17 request endpoint finds type by body not query. Better error handling on what goes wrong if incorrect type or missing body parameter. 2018-10-30 20:34:26 +01:00
KevinMidboe 5a48158f07 Request now happens at /request with id parameter and query for type selection. Only allows movie or show type and is static set in the controller. AddRequest adds tmdb item to database with time of request. 2018-10-30 19:20:52 +01:00
KevinMidboe 161a466ab7 Rewrote how local plex library is indexed and what it returns. After searching plex the response is separated into three classes by types (movie, show & episode). Plex also has a function for inputing a (tmdb)movie object and searching for matches of name & type in plex. If a match the object matchedInPlex variable is set to true. 2018-10-29 21:01:16 +01:00
KevinMidboe 8f5bd44e4d Added endpoint for new plex search. 2018-10-29 20:57:22 +01:00
KevinMidboe 5d8869e042 Rewrote every function for searching and looking up items from tmdb library. Now there are separate functions for the four categories of search and three for info (multi, movie, show & person). Each function now has its own endpoint and matching controller. Converting tmdb results into a class has been alterted from using three classes; movie, show & person, and each have each their own convertTmdbTo function. Now the structure of the three types are more structured and no longer a single "seasoned" class object. 2018-10-29 20:55:18 +01:00
KevinMidboe 41d6bba743 v2 endpoints added for clearer intent in endpoints. Two new controller categories; info and search. 2018-10-28 12:21:47 +01:00
KevinMidboe a29bca7361 Controller now expects three parameters for posting to addMagnet; magnet, name and tmdb_id. 2018-08-12 23:59:26 +02:00
KevinMidboe 657ab10034 Removed unused comments. 2018-05-06 18:36:26 +02:00
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 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
KevinMidboe ba96e27c43 Alongside the token the value of admin state is also sent. 2018-03-07 01:35:40 +01:00
KevinMidboe 59b206bf2d Forgot a leading / 2018-03-06 22:13:53 +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 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
KevinMidboe 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
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 93e1ef6d99 Linted app and server.js files. 2018-02-07 13:52:39 +01:00
KevinMidboe 58449fc753 Linted all middleware. 2018-02-07 13:52:08 +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 44878a295c Merge branch 'api_fixes' of github.com:kevinmidboe/seasonedShows into api_fixes 2018-02-05 14:25:25 +01:00
KevinMidboe 9b0fa88a72 Changed docstring and removed the unused port variable. 2018-02-05 14:25:13 +01:00
KevinMidboe 77d7167fcb Changed so that one must not be auth to get requested elements. This might change. 2018-02-05 14:22:44 +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 7d44f1518f Updated gitignore to ignore conf folder and deleted the contents of conf. 2017-12-01 10:57:28 +01:00
KevinMidboe 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
KevinMidboe 7cce61b3bb Setup for sentry. Need to add __DSN__ value manually. 2017-10-26 15:19:10 +02: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 40928a6e46 Added docstring 2017-10-23 14:59:58 +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