From 9c907d6560d3fee916c4e576c7412fbefc145e87 Mon Sep 17 00:00:00 2001 From: gerwoud Date: Sun, 31 Mar 2024 17:21:33 +0200 Subject: [PATCH] changes --- backend/project/__main__.py | 1 + backend/project/endpoints/courses/courses.py | 2 +- backend/project/utils/authentication.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/project/__main__.py b/backend/project/__main__.py index b0056304..2e7140c7 100644 --- a/backend/project/__main__.py +++ b/backend/project/__main__.py @@ -1,5 +1,6 @@ """Main entry point for the application.""" +from os import getenv from dotenv import load_dotenv from flask_cors import CORS from project import create_app_with_db diff --git a/backend/project/endpoints/courses/courses.py b/backend/project/endpoints/courses/courses.py index 243692c4..7b494b04 100644 --- a/backend/project/endpoints/courses/courses.py +++ b/backend/project/endpoints/courses/courses.py @@ -23,7 +23,7 @@ class CourseForUser(Resource): """Api endpoint for the /courses link""" - # @login_required + @login_required def get(self): """ " Get function for /courses this will be the main endpoint diff --git a/backend/project/utils/authentication.py b/backend/project/utils/authentication.py index c1a96248..3974f450 100644 --- a/backend/project/utils/authentication.py +++ b/backend/project/utils/authentication.py @@ -37,6 +37,7 @@ def return_authenticated_user_id(): """This function will authenticate the request and check whether the authenticated user is already in the database, if not, they will be added """ + print("wadaheeel") authentication = request.headers.get("Authorization") if not authentication: abort(