From 9da246e91e7143536973bd9cfd1f11f4a6578f3b Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Mon, 15 Apr 2024 23:59:00 +0200 Subject: Protect timer operations with session --- view/timers_list.templ | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'view/timers_list.templ') diff --git a/view/timers_list.templ b/view/timers_list.templ index 92d7013..c68979c 100644 --- a/view/timers_list.templ +++ b/view/timers_list.templ @@ -35,14 +35,16 @@ templ TimerCreateForm(timerName string, err string) { } -templ TimersList(timers []model.Timer) { +templ TimersList(timers []model.Timer, isSignedIn bool) {

Timers

for _, t := range timers { @timer(t) } -

Create timer

- @TimerCreateForm("", "") + if isSignedIn { +

Create timer

+ @TimerCreateForm("", "") + }
} -- cgit