mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 10:49:14 +02:00
Merge branch 'main' of github.com:masterElmar/htwkalender into 10-roomfinder
This commit is contained in:
@@ -27,6 +27,7 @@ export async function fetchModulesByCourseAndSemester(
|
||||
modulesResponse.forEach((module: Module) =>
|
||||
modules.push(
|
||||
new Module(
|
||||
module.uuid,
|
||||
module.name,
|
||||
course,
|
||||
module.name,
|
||||
@@ -50,6 +51,7 @@ export async function fetchAllModules(): Promise<Module[]> {
|
||||
responseModules.forEach((module: Module) => {
|
||||
modules.push(
|
||||
new Module(
|
||||
module.uuid,
|
||||
module.name,
|
||||
module.course,
|
||||
module.name,
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { Module } from "../model/module";
|
||||
|
||||
export async function fetchModule(name: string): Promise<Module> {
|
||||
export async function fetchModule(module: Module): Promise<Module> {
|
||||
const request = new Request("/api/module", {
|
||||
method: "GET",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Name: encodeURI(name),
|
||||
},
|
||||
body: JSON.stringify(module),
|
||||
});
|
||||
|
||||
return await fetch(request)
|
||||
@@ -16,6 +16,7 @@ export async function fetchModule(name: string): Promise<Module> {
|
||||
.then(
|
||||
(module: Module) =>
|
||||
new Module(
|
||||
module.uuid,
|
||||
module.name,
|
||||
module.course,
|
||||
module.name,
|
||||
|
Reference in New Issue
Block a user