diff --git a/model/stream.go b/model/stream.go index fc3572c71..08d070c4b 100755 --- a/model/stream.go +++ b/model/stream.go @@ -385,6 +385,7 @@ type StreamDTO struct { Start time.Time End time.Time Duration int32 + LectureHall string } func (s Stream) ToDTO() StreamDTO { @@ -408,6 +409,7 @@ func (s Stream) ToDTO() StreamDTO { Start: s.Start, End: s.End, Duration: duration, + LectureHall: s.RoomCode, } } diff --git a/web/template/home.gohtml b/web/template/home.gohtml old mode 100644 new mode 100755 index fa40dca79..f3c318b89 --- a/web/template/home.gohtml +++ b/web/template/home.gohtml @@ -37,6 +37,7 @@ link.setAttribute('href', location.href); document.head.appendChild(link); +

+ diff --git a/web/ts/entry/home.ts b/web/ts/entry/home.ts index 9aacde30f..8b0bbe8ab 100644 --- a/web/ts/entry/home.ts +++ b/web/ts/entry/home.ts @@ -4,3 +4,4 @@ export * from "../components/livestreams"; export * from "../components/course"; export * from "../components/servernotifications"; export * from "../components/main"; +export * from "../utilities/lectureHallValidator"; diff --git a/web/ts/utilities/lectureHallValidator.ts b/web/ts/utilities/lectureHallValidator.ts new file mode 100644 index 000000000..b4da3198d --- /dev/null +++ b/web/ts/utilities/lectureHallValidator.ts @@ -0,0 +1,4 @@ +export function isLectureHallValid(lectureHall: string): boolean { + const regex = /^\d{4}\.[A-Z0-9]{2}\.[A-Z0-9]{3,4}$/; + return regex.test(lectureHall); +}