Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding backend tables and routes to like and dislike a featured course #65

Merged
merged 365 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
365 commits
Select commit Hold shift + click to select a range
32d415e
Adding clone course mutation that lets the user clone a course in the…
Mau-MD Jul 19, 2022
0e5a8e2
Adding toast for when the user succeds/fails to clone a course inside…
Mau-MD Jul 19, 2022
e8b6c71
Redirecting the user when the course gets cloned successfully in code…
Mau-MD Jul 19, 2022
84e29bf
Adding frontend form validation with Yup inside code form
Mau-MD Jul 19, 2022
c29e2e2
Adding error when course doesn't exist when cloning a course in code …
Mau-MD Jul 19, 2022
149ddd1
Adding basic modal to display when the user wants to delete a course
Mau-MD Jul 19, 2022
98e2af6
adding logic to open and close the modal to delete a course
Mau-MD Jul 19, 2022
d02730d
Adding a card that to display in the delete course modal when user wa…
Mau-MD Jul 19, 2022
cd1a22f
Adding grid to display multiple video cards when user want's to delet…
Mau-MD Jul 19, 2022
fd735da
Typo
Mau-MD Jul 19, 2022
755c8c5
adding onClick and objectId props so an user can select which videos …
Mau-MD Jul 19, 2022
d8ffe30
adding backend route to fetch the resources of a course given the id
Mau-MD Jul 19, 2022
d001d64
Adding useQuery hook to fetch from backend the resources from an spec…
Mau-MD Jul 19, 2022
991e9c5
Rendering multiple video cards based on what we received from the bac…
Mau-MD Jul 19, 2022
cc123a7
Adding toggling feature where the user can select which videos he did…
Mau-MD Jul 19, 2022
4c41372
Adding courseId prop to deleteCourse modal so it can fetch resources …
Mau-MD Jul 19, 2022
38443ed
Sorting videos by difficulty when the user is which selecting which o…
Mau-MD Jul 19, 2022
009fb8d
Making the video card image smaller so it doesn't have black bars whe…
Mau-MD Jul 19, 2022
c648717
Adding resources selected text and delete course button
Mau-MD Jul 19, 2022
6c2b881
Merge branch 'main' into delete_course
Mau-MD Jul 20, 2022
9742d17
Adding missing imports that were lost when merging into main
Mau-MD Jul 20, 2022
e238202
Merge branch 'main' into delete_course_logic
Mau-MD Jul 20, 2022
c5ea1fd
Fixing build errors to make the app deployable
Mau-MD Jul 20, 2022
a9b8764
adding a function to delete a course from the database given its obje…
Mau-MD Jul 20, 2022
42a308b
adding a backend route that interacts with deleteCourse function so a…
Mau-MD Jul 20, 2022
c4700eb
Merge branch 'delete_course_logic' into delete_course_connection
Mau-MD Jul 20, 2022
ee28c21
Adding loading state using skeleton and spinners inside delete course…
Mau-MD Jul 20, 2022
ee726c0
adding mutation that handles the connection between frontend and back…
Mau-MD Jul 20, 2022
4e68d45
Typo
Mau-MD Jul 20, 2022
7ad5cca
Saving videoId when creating a resource, to be used inside internal r…
Mau-MD Jul 20, 2022
3311ded
Adding helper functions to update a feedback object, and if it doesn'…
Mau-MD Jul 20, 2022
b3e913f
Fixing a bug where feedback was not saving in the database
Mau-MD Jul 21, 2022
ff9f14a
adding a functions that adds positive feedback to all resources that …
Mau-MD Jul 21, 2022
e19e4d6
giving positive feedback to a resource when a user marks it as completed
Mau-MD Jul 21, 2022
809ff7b
adding a function that gives negative feedback to a list of videoIds
Mau-MD Jul 21, 2022
c0ba300
passing disliked videos parameters to the backend using axios
Mau-MD Jul 21, 2022
b5c2d8d
Adding types to handle internal ranking interfaces when getting inter…
Mau-MD Jul 22, 2022
d3fd2f1
getting internal feedback from database and assign it to videos, and …
Mau-MD Jul 22, 2022
14aff03
using internal ranking functions and merging them together with exter…
Mau-MD Jul 22, 2022
05a0751
changin getExternalRanking function when creating a course to getFina…
Mau-MD Jul 22, 2022
3d57de6
changing the parameter from final_score to external_final_score to be…
Mau-MD Jul 22, 2022
82f1bab
applying weight to external and internal ranking so it matches the fo…
Mau-MD Jul 22, 2022
e49b7b5
multiplying final internal score by 100 so it matches the data of the…
Mau-MD Jul 22, 2022
5318b4e
adding debug routes for manual testing purposes
Mau-MD Jul 22, 2022
2072f4e
adding algorithm to remove duplicates if they are found when fetching…
Mau-MD Jul 22, 2022
f739e7f
Merge branch 'avoid_duplicated' into feed
Mau-MD Jul 22, 2022
1ca6f62
Adding feed button to the navbar
Mau-MD Jul 22, 2022
045a8ad
Adding feed card that shows a post inside the feed
Mau-MD Jul 23, 2022
a6d6123
Adding props to FeedCard so we can have multiple feed content
Mau-MD Jul 25, 2022
dbd1941
Adding types for post so it mathces the backend
Mau-MD Jul 25, 2022
b81bb2f
including nested pointers inside backend so it also fetches the usern…
Mau-MD Jul 25, 2022
11ed56f
Displaying in the frontend post fetched from the backend
Mau-MD Jul 25, 2022
c4353b9
modifying post type so it contains relations
Mau-MD Jul 25, 2022
54823ad
Conditional rendering course component based if the post contains a c…
Mau-MD Jul 25, 2022
6f0ea24
installing date fns to handle javascript dates more easily
Mau-MD Jul 25, 2022
6bf41de
adding formatDistanceToNow that returns in text how old a post ist
Mau-MD Jul 25, 2022
df9b9ab
changing updateResourceStatus function so it also creates a post when…
Mau-MD Jul 25, 2022
652f92b
prop drilling the appropiate params required to create a post when fi…
Mau-MD Jul 25, 2022
b1139d0
saving correctly the course relation inside the backend and removing …
Mau-MD Jul 25, 2022
dca1319
adding params to FeedCard so it also shows the course when you can co…
Mau-MD Jul 25, 2022
bc2ff28
Using the cloneCourse mutation again to clone a course inside the use…
Mau-MD Jul 25, 2022
5d33e21
Formatting courseCreatingAt to display when trying to clone a course …
Mau-MD Jul 25, 2022
88f980d
Adding new post component
Mau-MD Jul 25, 2022
cebef4c
adding react select to handle select input forms with ease
Mau-MD Jul 25, 2022
c5e514c
Adding formik to handle form logic inside new post form
Mau-MD Jul 25, 2022
680d715
adding course fetching to be able to show it inside the select in new…
Mau-MD Jul 25, 2022
889031f
Adding formik logic that enables to handle react select
Mau-MD Jul 25, 2022
102b930
adding mutation to send form data to backend and create a post
Mau-MD Jul 25, 2022
21a4735
invalidating post data so it refetches again when a new post is created
Mau-MD Jul 25, 2022
7f0b18e
adding authorization header inside the post
Mau-MD Jul 25, 2022
24d8d3d
Sorting posts so it displays the most recent one
Mau-MD Jul 25, 2022
ae77ae1
resetting the post form after subimitting and creating a post
Mau-MD Jul 25, 2022
13ef743
making submit form button bigger
Mau-MD Jul 25, 2022
dd5a279
conditional rendering add form component
Mau-MD Jul 25, 2022
eea36ca
adding skip and limit parameters to getPosts endpoint to enable pagin…
Mau-MD Jul 25, 2022
d077f79
adding infiniteQuery using useInfiniteQuery hook and a button that lo…
Mau-MD Jul 25, 2022
19f678a
adding event listener to window to fetch next page when the user scro…
Mau-MD Jul 25, 2022
ac9ee88
returning undefined when there are no new content to fetch when using…
Mau-MD Jul 25, 2022
71f77c3
adding loading spinner next to title when the content is fetching
Mau-MD Jul 25, 2022
9443c9f
Adding skeleton component when feed is initally loading
Mau-MD Jul 25, 2022
a270aa0
Optimizing network calls with a debounce function that will only get …
Mau-MD Jul 26, 2022
63c3562
Adding loading state when user is uploading something to the feed
Mau-MD Jul 26, 2022
85ec6b4
adding loading taste when making a post
Mau-MD Jul 26, 2022
c40fb6f
Adding following router
Mau-MD Jul 26, 2022
8bfa30d
adding follow router inside app.ts
Mau-MD Jul 26, 2022
ab63147
adding follow router as a route inside app.ts
Mau-MD Jul 26, 2022
42a2f20
adding authentication middleware inside follow to ensure the user is …
Mau-MD Jul 26, 2022
7e9480f
adding followUser function that adds a column in the following table
Mau-MD Jul 26, 2022
7c70a81
adding a function that returns all the users a particular user follows
Mau-MD Jul 26, 2022
8a67250
Adding follwing layout so the component is always visible when user i…
Mau-MD Jul 26, 2022
f9d5e1d
Adding followingCard component that shows the users that you follow
Mau-MD Jul 26, 2022
3c4f494
adding props to followingCard so it changes dinamically
Mau-MD Jul 26, 2022
ad42470
adding inverted background color so the follow card works in darkmode
Mau-MD Jul 26, 2022
6ca352a
Adding status helper funcitons that interact with the status table. I…
Mau-MD Jul 26, 2022
76c0ccf
adding status route to set a status
Mau-MD Jul 26, 2022
ac7ea7f
Refactoring Following Layout component so it's more specific
Mau-MD Jul 26, 2022
0a33e24
Adding Status Form Dummy component to let users update their status u…
Mau-MD Jul 26, 2022
c53dd0b
Adding follow form component so users can follow new people
Mau-MD Jul 26, 2022
0e0f75e
Adding tab functionality so it renders both status and follow form co…
Mau-MD Jul 26, 2022
7e14e22
Adding formik to folow someone form so we can handle user form with eas
Mau-MD Jul 26, 2022
ea08be9
Adding form validation with yup
Mau-MD Jul 26, 2022
a1d5fb6
Changing follow user function so it uses username instead of user id
Mau-MD Jul 26, 2022
9241298
Adding an error when the user already follows a user
Mau-MD Jul 26, 2022
5dea581
Adding mutation to be able to follow a user by sending a username
Mau-MD Jul 26, 2022
2188b10
adding formik to status form to handle forms easily
Mau-MD Jul 26, 2022
4ac754f
Adding yup to status form to handle errors when required
Mau-MD Jul 26, 2022
1ceed60
Adding mutation to update status in the backend
Mau-MD Jul 26, 2022
8e5e017
Adding loading state when updating the status using the form
Mau-MD Jul 26, 2022
cfddc4b
Adding ref to be able to clear the form after successful state update
Mau-MD Jul 26, 2022
0c07583
Adding functions to get the status of the users you are currently fol…
Mau-MD Jul 27, 2022
607dbd7
adding a route to get the status of the people you are currently foll…
Mau-MD Jul 27, 2022
91473dc
Adding following typescript type so it matches the database schema
Mau-MD Jul 27, 2022
025bda0
adding useQuery hook to fetch the status from the server
Mau-MD Jul 27, 2022
4840bcc
Renaming component because it had a typo
Mau-MD Jul 27, 2022
3b6590f
Mapping and displying all the following status
Mau-MD Jul 27, 2022
9c25966
invalidating following query so it fetches again when user changes it…
Mau-MD Jul 27, 2022
41dc838
invaldiating following query when user starts following a new user so…
Mau-MD Jul 27, 2022
83fb739
adding full width to feed box so it always takes all available space
Mau-MD Jul 27, 2022
33154d5
Adding skeletons to let the user know that the client is currently fe…
Mau-MD Jul 27, 2022
0e50039
Adding random emoji picker given a list of emojis
Mau-MD Jul 27, 2022
648a0a5
Automatically changing user status when user starts a resource
Mau-MD Jul 27, 2022
ea38674
Adding function and route to unfollow a user given its id
Mau-MD Jul 27, 2022
f24a217
Adding button to handle unfollowing a user
Mau-MD Jul 27, 2022
acc67a3
Adding mutation to stop following a particular user
Mau-MD Jul 27, 2022
22cf29b
Fixing a bug when the unfollow function was unfollowing random objects
Mau-MD Jul 27, 2022
d44e787
Resetting form when following a new user
Mau-MD Jul 27, 2022
96d464c
adding a route and a function to get posts from people that you follow
Mau-MD Jul 27, 2022
5af475a
changing post fetch route so it fetches from the people that you follow
Mau-MD Jul 27, 2022
5eaea55
invalidating posts query when a user follows or unfollows someone
Mau-MD Jul 27, 2022
8ab7cdc
Adding function to get sorensen dice coefficient for string similarit…
Mau-MD Jul 27, 2022
72d19ab
adding functions to get cosine similarity score for string similarity…
Mau-MD Jul 27, 2022
317cf27
adding tests for string similarity code
Mau-MD Jul 27, 2022
b038c3a
adding functions to remove whitespaces and special characters of a st…
Mau-MD Jul 27, 2022
b470669
removing console log and adding test for final string similarity score
Mau-MD Jul 27, 2022
75afcc9
adding suggestions routes to handle everything related to users sugge…
Mau-MD Jul 28, 2022
b086c34
adding parseJSON type to avoid writing it everytime you want to acces…
Mau-MD Jul 28, 2022
96967a3
adding suggestions algorithms (check comment)
Mau-MD Jul 28, 2022
3a1cc69
addoing route to get suggestions from a user
Mau-MD Jul 28, 2022
ed5e85e
Adding UI that displays suggestions based on what your friends are le…
Mau-MD Jul 28, 2022
7f95bd0
Adding profile route and base component
Mau-MD Jul 29, 2022
4938e64
making profile button actually work, and redirects to the profile com…
Mau-MD Jul 29, 2022
16ef60e
Adding profile information card
Mau-MD Jul 29, 2022
74b8ad1
Adding props to FeedIndex so it can fetch from both your followers or…
Mau-MD Jul 29, 2022
440e35b
Adding route and function to fetch post given a username
Mau-MD Jul 29, 2022
75f16b3
Adding props so it can be reused in another page
Mau-MD Jul 29, 2022
24ee735
changing routes so they use id instead of username so it's easier to …
Mau-MD Jul 29, 2022
5143aea
Adding user route so we can fetch user info given its id
Mau-MD Jul 29, 2022
a3cc34d
moving getUserByUsername to user file and also adding getUserById
Mau-MD Jul 29, 2022
02fc93b
adding route to get user by id
Mau-MD Jul 29, 2022
8cd4673
fetching user from id to display on user profile
Mau-MD Jul 29, 2022
b3b14ab
adding a function to get the status of a user given its id
Mau-MD Jul 29, 2022
6d89030
getting status and displaying it on the frontend
Mau-MD Jul 29, 2022
243b853
adding userId prop to feed card and hashlink so it goes to user profi…
Mau-MD Jul 29, 2022
4391069
adding route to get status of the multiple people that a user follows
Mau-MD Jul 29, 2022
4e9146d
conditional rendering unfollow button inside the following card to av…
Mau-MD Jul 29, 2022
daca9c9
adding props to following index so it can also fetch followers given …
Mau-MD Jul 29, 2022
d73792e
style changes
Mau-MD Jul 29, 2022
5ac67fa
Conditional rendering post button so you cannot create posts when you…
Mau-MD Jul 29, 2022
a4e4431
adding name to avatars to it renders an autogenerated image
Mau-MD Jul 29, 2022
9b8fcba
adding loading state to user fetching
Mau-MD Jul 29, 2022
2d94149
adding fallback image when no image is available
Mau-MD Jul 29, 2022
8b904c6
changing component logic so it's optional to receive a onClick function
Mau-MD Jul 29, 2022
cc70518
Renaming component to something more general, since this component is…
Mau-MD Jul 29, 2022
b9c8963
Reusing DeleteModal component to show preview of a group. Just change…
Mau-MD Jul 29, 2022
1a0c97a
Adding logic to open modal inside the feed card component
Mau-MD Jul 29, 2022
4be6ea4
Moving clone course mutatino to CloneModal component
Mau-MD Jul 29, 2022
4acaf7b
changed courseCreatedAt prop so it matches the real createdAt value
Mau-MD Jul 29, 2022
eff2c28
adding styles to make the cards look aligned
Mau-MD Jul 29, 2022
08a92b2
adding more fallback images when the images are first loading
Mau-MD Jul 29, 2022
11e67f7
deleting refresh resources card as is not being used
Mau-MD Jul 29, 2022
b1d5edf
only showing create post button when the user is on their profile or …
Mau-MD Jul 29, 2022
f51d70d
only showing navlinks when authenticated
Mau-MD Jul 29, 2022
972b1ec
redirecting to dashboard when login
Mau-MD Jul 29, 2022
3ebe7cb
adding image when the user doesn't have any course yet
Mau-MD Jul 29, 2022
63cf4d2
removing unnnecesary prop
Mau-MD Jul 29, 2022
655e47d
adding skip and limit to course fetch so it can support pagination
Mau-MD Jul 29, 2022
c5cec6e
fixing a parse bug where you cant use skip and limit with findAll
Mau-MD Jul 29, 2022
6916656
Using the same function in FeedIndex.tsx to add infinite scroll fetch…
Mau-MD Jul 29, 2022
579797d
adding support for search query in the courses route
Mau-MD Jul 29, 2022
43c934d
Merge branch 'feed_pagination' into search_bar
Mau-MD Jul 29, 2022
a21e83c
adding any type so typescript doesn't complain
Mau-MD Jul 29, 2022
e1b26e8
performing a search everytime the searchQuery changes, and adding a d…
Mau-MD Jul 29, 2022
c319add
changing parse contains to matches, so the search doesn't consider up…
Mau-MD Jul 29, 2022
f102872
Fixing error where courses were not appearing when creating a new post
Mau-MD Jul 29, 2022
409cb24
Adding featured route
Mau-MD Aug 1, 2022
01e5885
Adding featured route into navbar
Mau-MD Aug 1, 2022
0b818ab
Adding props and changing component logic so it can handle cloning fr…
Mau-MD Aug 1, 2022
4b4acf2
adding heart icon to handle like courses
Mau-MD Aug 1, 2022
4783ac5
Adding basic ui to show inside the feautred index
Mau-MD Aug 1, 2022
347b9a6
adding banner to featured page
Mau-MD Aug 1, 2022
1d51246
adding function to make an existing course featured by modifying the …
Mau-MD Aug 1, 2022
eb785df
Fixing a bug where dashboard was crashing since it had an invalid date
Mau-MD Aug 1, 2022
97422ef
Adding make featured modal boilerplate that opens when user clicks th…
Mau-MD Aug 1, 2022
878ac64
adding route to make a course featured
Mau-MD Aug 1, 2022
1dfb6bf
fixing a bug where Parse was crashing since it wasn't getting the cou…
Mau-MD Aug 1, 2022
39c124c
Adding mutation to connect the frontend making it able to make a cour…
Mau-MD Aug 1, 2022
cbc8ac5
adding function to fetch all featured courses
Mau-MD Aug 1, 2022
d110534
adding route to be able to fetch featured courses
Mau-MD Aug 1, 2022
969afb4
removing unnecessary variables inside the fetch featured courses route
Mau-MD Aug 1, 2022
d315886
changing fetch course route name so it doesnt interfere with other ro…
Mau-MD Aug 1, 2022
270943b
changing getAllFeaturedCourses query so it sorts by likes and only sh…
Mau-MD Aug 1, 2022
35150db
Copying infinite scroll logic from dashboard index. adding mutation t…
Mau-MD Aug 1, 2022
57a4452
adding search functionality inside featured courses
Mau-MD Aug 1, 2022
edcc3db
removing submit existing course button from feature page since that b…
Mau-MD Aug 1, 2022
92300e1
Adding create new course from scratch route and component
Mau-MD Aug 1, 2022
7198364
Adding link to new course from scratch page
Mau-MD Aug 1, 2022
2ae9e3c
Adding inputs inside course from scratch page so people can create th…
Mau-MD Aug 1, 2022
3a47a8e
Adding formik to handle form input when the users wants to create a n…
Mau-MD Aug 1, 2022
dd2a999
adding a function to check if an url is a youtube, and it so, save it…
Mau-MD Aug 1, 2022
02ad3f0
Creating component to render iframe youtube video
Mau-MD Aug 1, 2022
b6113f5
saving the embed url instead of the youtube url
Mau-MD Aug 1, 2022
c4173a2
nit
Mau-MD Aug 1, 2022
be9f905
conditionally rendering youtube embeds when inputting a valid youtube…
Mau-MD Aug 1, 2022
24a69c2
adding a function to create a course from scratch given youtube urls
Mau-MD Aug 1, 2022
03215ee
adding a function to check if a youtube url is valid, and if it is, r…
Mau-MD Aug 1, 2022
62921dd
adding a route to let the users create a course given youtube urls
Mau-MD Aug 1, 2022
207462c
avoiding fetching featured courses when fecthing user courses
Mau-MD Aug 1, 2022
086f062
linking featured course to a user so it can display who created the c…
Mau-MD Aug 1, 2022
10ff772
including user info when fetching featured courses so it can show who…
Mau-MD Aug 1, 2022
13be4e6
Adding mutation to create a new course from scratch and send the data…
Mau-MD Aug 1, 2022
ecaac5f
Adding a text that shows who created a featured course
Mau-MD Aug 1, 2022
a968dba
changing createdBy text to be a link button
Mau-MD Aug 1, 2022
3eac27f
adding base url to cypress config
Mau-MD Aug 2, 2022
536ed03
adding command to login user
Mau-MD Aug 2, 2022
8beb41d
adding data-test ids to multiple components
Mau-MD Aug 2, 2022
b98e5fd
adding command to register a user
Mau-MD Aug 2, 2022
83ba447
creating tests to check if login and registration works
Mau-MD Aug 2, 2022
398a51e
Adding more test ids
Mau-MD Aug 2, 2022
2559bd2
adding a test that creates a new course
Mau-MD Aug 2, 2022
6bd815b
adding tests that check if the usser can follow and make a new posr
Mau-MD Aug 2, 2022
136bb0d
Creating a popover that renders the content that wants to be shown wh…
Mau-MD Aug 2, 2022
44784bc
creating a custom hook that handles tour logic
Mau-MD Aug 2, 2022
92b8cd9
adding function to conditionally start the tour
Mau-MD Aug 2, 2022
dfb0b26
adding prev step function to be able to step bac
Mau-MD Aug 2, 2022
8a97cb8
adding previous step button inside the popover
Mau-MD Aug 2, 2022
eadefc7
Adding guided tour to course dashboard
Mau-MD Aug 2, 2022
7f719be
adding guided tour to new course form
Mau-MD Aug 2, 2022
d5bfdfd
changing prop to make the popover to also support react node components
Mau-MD Aug 2, 2022
260fda7
adding tour inside hub video dashboard
Mau-MD Aug 2, 2022
e5f428f
Adding tour inside feed dashboard
Mau-MD Aug 2, 2022
58a469e
adding course inside featured page
Mau-MD Aug 2, 2022
8d546ad
adding tour inside difficulty selector page
Mau-MD Aug 2, 2022
09101ca
adding functions to useTour so it can see in localeStorage if the use…
Mau-MD Aug 2, 2022
f343caa
Removing startTour letting useTour to automatically handle that if it…
Mau-MD Aug 2, 2022
41488bf
adding helper functions to handle database queries
Mau-MD Aug 2, 2022
2b86a7e
adding function to like a featured course.
Mau-MD Aug 2, 2022
53d9ba1
adding route to like a featured course given its id
Mau-MD Aug 2, 2022
0039e24
adding functions that dislikes a course given its id
Mau-MD Aug 2, 2022
9d5b964
adding a route that dislikes a course given its id
Mau-MD Aug 2, 2022
c1989f8
fetching if user has liked the course before. when fetching featured …
Mau-MD Aug 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion backend/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ import dotenv from "dotenv";
import Parse from "parse/node";

import auth from "./src/routes/auth";
import cors from "cors";
import { NotFoundError } from "./src/utils/errors";
import debug from "./src/routes/debug";
import cors from "cors";
import course from "./src/routes/course";
import resources from "./src/routes/resources";
import post from "./src/routes/post";
import follow from "./src/routes/follow";
import suggestions from "./src/routes/suggestions";
import user from "./src/routes/user";

dotenv.config();

Expand All @@ -19,6 +25,12 @@ app.use(cors());

app.use("/auth", auth);
app.use("/debug", debug);
app.use("/course", course);
app.use("/resources", resources);
app.use("/post", post);
app.use("/follow", follow);
app.use("/suggestions", suggestions);
app.use("/user", user);

app.get("/", async (req, res) => {
const testObject = new Parse.Object("test");
Expand Down
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.27.2",
"cors": "^2.8.5",
"date-fns": "^2.28.0",
"dotenv": "^16.0.1",
Expand Down
Loading