Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Enhancement/endpoints cleanup #61

Merged
merged 32 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
12830d5
added query agent containing functions that can be used by multiple e…
AronBuzogany Mar 6, 2024
81e3d3c
loading env variables is only necessary in __main__
AronBuzogany Mar 6, 2024
658dfd3
removed unneeded load_dotenv
AronBuzogany Mar 6, 2024
7dd5682
completed functions that are ought to be used by multiple endpoints o…
AronBuzogany Mar 6, 2024
e42c57d
simplified endpoint functions by using query_agent functions
AronBuzogany Mar 6, 2024
3467bb2
fixed linting
AronBuzogany Mar 6, 2024
69df26e
fixed urljoin incorrectly joining url
AronBuzogany Mar 6, 2024
e836f50
lint: removed trailing whitepsace
AronBuzogany Mar 6, 2024
e26c015
completely replaced functionality with query_agent functions
AronBuzogany Mar 6, 2024
fd941b2
added functionality for patching an entry in the database
AronBuzogany Mar 6, 2024
073d6c5
fixed linting
AronBuzogany Mar 6, 2024
fd2ae83
filtered queries and forms to only contain entries that are valid in …
AronBuzogany Mar 6, 2024
d675fe6
created function that filters dict keys that are not in table
AronBuzogany Mar 6, 2024
2298d8c
made class serializable
AronBuzogany Mar 6, 2024
d0e9a10
url query is not a valid authentication method, filtered out option
AronBuzogany Mar 6, 2024
6b3e733
using query_agent functions to prevent code duplication
AronBuzogany Mar 6, 2024
a00cb99
split courses into multiple files to keep it organized
AronBuzogany Mar 6, 2024
f4aff02
fixed linting
AronBuzogany Mar 6, 2024
4e0945f
added new courses blueprint
AronBuzogany Mar 6, 2024
05038c9
removed trailing space
AronBuzogany Mar 6, 2024
a142a88
changed test to stay consistent with course admin relation also
AronBuzogany Mar 7, 2024
1f11956
added query agent functions to prevent code duplication
AronBuzogany Mar 7, 2024
1b67c99
using f string instead of concating string with plus operator
AronBuzogany Mar 7, 2024
f08f9f7
updated with better module doc
AronBuzogany Mar 7, 2024
3b78e24
Merge branch 'development' into enhancement/endpoints-cleanup
AronBuzogany Mar 8, 2024
a05e93a
removed courses file (part of merge)
AronBuzogany Mar 8, 2024
22e63ae
removed unused module
AronBuzogany Mar 8, 2024
729416e
appending forward slash when using urljoin
AronBuzogany Mar 8, 2024
b1626fc
remove unused file
AronBuzogany Mar 8, 2024
cff5d17
fixed linting
AronBuzogany Mar 8, 2024
4e56539
removed unused file
AronBuzogany Mar 8, 2024
ba98766
removed duplicate column values
AronBuzogany Mar 8, 2024
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
3 changes: 1 addition & 2 deletions backend/project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from .db_in import db
from .endpoints.index.index import index_bp
from .endpoints.projects.project_endpoint import project_bp
from .endpoints.courses import courses_bp

from .endpoints.courses.courses_config import courses_bp


def create_app():
Expand Down
5 changes: 2 additions & 3 deletions backend/project/__main__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Main entry point for the application."""

from sys import path
from dotenv import load_dotenv
from project import create_app_with_db
from project.db_in import url

path.append(".")

if __name__ == "__main__":
load_dotenv()
app = create_app_with_db(url)
app.run(debug=True)
3 changes: 0 additions & 3 deletions backend/project/db_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

import os
from flask_sqlalchemy import SQLAlchemy
from dotenv import load_dotenv
from sqlalchemy import URL

db = SQLAlchemy()

load_dotenv()

DATABSE_NAME = os.getenv("POSTGRES_DB")
DATABASE_USER = os.getenv("POSTGRES_USER")
DATABASE_PASSWORD = os.getenv("POSTGRES_PASSWORD")
Expand Down
Loading