Skip to content

Commit

Permalink
Implement multiple authors for lectures (#366)
Browse files Browse the repository at this point in the history
* Implement multiple authors for lectures

* Fix linting
  • Loading branch information
Lauritz-Tieste authored Sep 2, 2024
1 parent a3eec97 commit 29df8f7
Show file tree
Hide file tree
Showing 87 changed files with 265 additions and 89 deletions.
6 changes: 5 additions & 1 deletion api/endpoints/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ async def list_courses(
if language:
out = (course for course in out if course.language is not None and language.lower() in course.language.lower())
if author:
out = (course for course in out if course.author is not None and author.lower() in course.author.lower())
out = [
course
for course in out
if course.authors is not None and any(author.lower() == a["name"].lower() for a in course.authors)
]
if free is not None:
out = (course for course in out if course.free == free)
if owned is not None:
Expand Down
4 changes: 2 additions & 2 deletions api/schemas/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class BaseCourse(BaseModel):
category: str | None = Field(description="Category of the course")
language: str | None = Field(description="Language of the course")
image: str | None = Field(description="Image URL of the course")
author: str | None = Field(description="Author of the course")
authors: list[dict[str, str]] = Field(description="Authors of the course")
price: int = Field(min=0, description="Price of the course in morphcoins")
learning_goals: list[str] = Field(description="Learning goals of the course")
requirements: list[str] = Field(description="Requirements of the course")
Expand All @@ -90,7 +90,7 @@ class BaseCourse(BaseModel):
category="Programming",
language="en",
image="https://example.com/image.png",
author="John Doe",
authors=[{"name": "John Doe", "url": "https://example.com"}],
price=100,
learning_goals=["Learn Python"],
requirements=["Basic knowledge of programming"],
Expand Down
4 changes: 3 additions & 1 deletion config/courses/algorithmen_und_datenstrukturen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ description: |
category:
language: de
image: https://static.bootstrap.academy/thumbnails/algorithmen.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/angular_5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Angular, das Frontend-Framework von Google, ist überall im Einsat
category:
language: de
image: https://static.bootstrap.academy/thumbnails/javascript.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/anonymitaet_im_internet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ description: |
category:
language: de
image: https://static.bootstrap.academy/thumbnails/anonymity.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/assembler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ description: |
category:
language: de
image: https://static.bootstrap.academy/thumbnails/assembler.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/bash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Bash ist die Programmiersprache für das Linux Terminal. Hiermit l
category:
language: de
image: https://static.bootstrap.academy/thumbnails/bash.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/binaere_mathematik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Binäre Mathematik hat zwar nichts direkt mit Programmierung zu tu
category:
language: de
image: https://static.bootstrap.academy/thumbnails/binary.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/binary_exploitation_secure_coding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "C ist eine sehr hardwarenahe Sprache. Dementsprechend muss man sic
category:
language: de
image: https://static.bootstrap.academy/thumbnails/binaryexploitationsecurecoding.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 3000
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/bitcoin_blockchain_kryptowaehrungen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Blockchain-Technologien haben einen fragwürdigen Ruf - manche lie
category:
language: de
image: https://static.bootstrap.academy/thumbnails/blockchain.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "C ist die Sprache, die als Vorlage für unsere modernen Sprachen z
category:
language: de
image: https://static.bootstrap.academy/thumbnails/c.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/c_sharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "C# - das Java von Microsoft - ist eine moderne, objektorientierte
category:
language: de
image: https://static.bootstrap.academy/thumbnails/c_sharp.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/clean_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Denkt immer daran: Wenn ihr schlechten Code schreibt, muss irgende
category:
language: de
image: https://static.bootstrap.academy/thumbnails/cleancode.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Die Cloud ist überall, so sagt man doch. Doch gerade wenn ihr sel
category:
language: de
image: https://static.bootstrap.academy/thumbnails/cloud.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "C++ ist die Weiterentwicklung von C - Objektorientierung, Vererbun
category:
language: de
image: https://static.bootstrap.academy/thumbnails/cpp.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/css3_fuer_anfaenger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Mit CSS definiert man, wie eine Website aussehen soll - nicht den
category:
language: de
image: https://static.bootstrap.academy/thumbnails/CSS.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/dart_flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Mit der Sprache Dart und dem Framework Flutter können mobile Apps
category:
language: de
image: https://static.bootstrap.academy/thumbnails/dartflutter.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/data_mining.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Alle sprechen von Data Science oder KI, die ja auch Daten nutzt. D
category:
language: de
image: https://static.bootstrap.academy/thumbnails/datamining.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 100
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/datenvisualisierung.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Data Science ist das eine, aber wie Daten gut dargestellt werden k
category:
language: de
image: https://static.bootstrap.academy/thumbnails/datenvisualisierung.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/devops_grundlagen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Die Softwareentwicklung hat sich stark weiter entwickelt. Klassisc
category:
language: de
image: https://static.bootstrap.academy/thumbnails/devops.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Auf meinem System läuft's doch. Dieses Problem kennen wir alle. A
category:
language: de
image: https://static.bootstrap.academy/thumbnails/docker.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/firewalls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Vorbei sind die Zeiten, wo man sich einfach alle seine Webservices
category:
language: de
image: https://static.bootstrap.academy/thumbnails/firewalls.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/ghidra_reverse_engineering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Malware ist mittlerweile überall - doch was genau tut sie? Stiehl
category:
language: de
image: https://static.bootstrap.academy/thumbnails/reversing.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/git_und_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Ihr entwickelt eure Programme noch ohne Git? Oh oh... Die Versioni
category:
language: de
image: https://static.bootstrap.academy/thumbnails/git.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/graphentheorie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Graphen ermöglichen Navigations-Algorithmen, aber auch Zustände,
category:
language: de
image: https://static.bootstrap.academy/thumbnails/algorithmen.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Die Programmiersprache gilt wohl als das, was funktionale Programm
category:
language: de
image: https://static.bootstrap.academy/thumbnails/haskell.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/html5_fuer_anfaenger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "HTML bildet die Grundlage jeder Website. Mit HTML ist auf jeder We
category:
language: de
image: https://static.bootstrap.academy/thumbnails/html.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/iam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ description: >-
category:
language: de
image: https://static.bootstrap.academy/thumbnails/iam.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/it_sicherheit_hacken_essentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description:
category:
language: de
image:
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "X Milliarden Geräte nutzen Java - und das hat einen Grund. Java k
category:
language: de
image: https://static.bootstrap.academy/thumbnails/java.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/java_algorithmen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Ihr könnt Java? Ein bisschen Übung kann nicht schaden, um eure K
category:
language: de
image: https://static.bootstrap.academy/thumbnails/java.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/java_fortgeschrittene_techniken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Ihr denkt, ihr könnt Java? Abwarten. Hier sind eingie Themen drin
category:
language: de
image: https://static.bootstrap.academy/thumbnails/java.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/java_ray_tracing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Habt ihr jemals gedacht, es wäre schon cool, selbst mal einen Ray
category:
language: de
image: https://static.bootstrap.academy/thumbnails/java.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/java_swing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "Grafische Oberflächen für Desktop-PCs werden zwar seltener, aber
category:
language: de
image: https://static.bootstrap.academy/thumbnails/java.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
4 changes: 3 additions & 1 deletion config/courses/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ description: "JavaScript - die Sprache ohne die kaum eine Website heutzutage noc
category:
language: de
image: https://static.bootstrap.academy/thumbnails/javascript.jpg
author: "The Morpheus Tutorials"
authors:
- name: "The Morpheus Tutorials"
url: "https://www.youtube.com/@TheMorpheusTutorials"
price: 0
learning_goals: []
requirements: []
Expand Down
Loading

0 comments on commit 29df8f7

Please sign in to comment.