Skip to content

Commit

Permalink
Fix not-logged in bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasReumann committed Aug 13, 2023
1 parent 6c3148f commit ff8c35e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/template/home.gohtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{- /*gotype: github.com/joschahenningsen/TUM-Live/web.IndexData*/ -}}
{{$user := .TUMLiveContext.User}}
{{$userID := 0}}
{{if $user}}{{$userID = $user.ID}}{{end}}
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
Expand Down Expand Up @@ -304,7 +306,7 @@
</article>
</template>
<template x-if="state.isCourse()">
<article x-data="home.courseContext(state.slug, state.year, state.term, {{$user.ID}})"
<article x-data="home.courseContext(state.slug, state.year, state.term, {{$userID}})"
x-init="$watch('state', (s) => reload(s.slug, s.year, s.term))"
class="tum-live-course-view">
<header>
Expand Down

0 comments on commit ff8c35e

Please sign in to comment.