From d5dcac0f783baad6166c2f46613db03bbab935e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th?= <tothmiklostibor@gmail.com> Date: Mon, 4 Oct 2021 11:43:24 +0200 Subject: [PATCH] fix --- .gitlab-ci.yml | 2 +- k8s/values.yaml | 2 +- web/router.go | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d7b7c8..86660ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: alpine variables: - VERSION: v2.1 + VERSION: v2.2 stages: - build diff --git a/k8s/values.yaml b/k8s/values.yaml index 3bdd0fc..1441f9c 100644 --- a/k8s/values.yaml +++ b/k8s/values.yaml @@ -2,5 +2,5 @@ replicas: 1 Domain: keresettaferi.kszk.bme.hu Name: keresettaferi -Tag: "v2.1" +Tag: "v2.2" REGISTRY_CONF: "${REGISTRY_CONF}" diff --git a/web/router.go b/web/router.go index e7c2328..9593459 100644 --- a/web/router.go +++ b/web/router.go @@ -106,7 +106,12 @@ func login(c *gin.Context) { } } - c.Redirect(http.StatusMovedPermanently, "/station/"+user.LastStation().Id) + stat := user.LastStation() + if stat == nil { + stat = data.Stations["first"] + } + + c.Redirect(http.StatusMovedPermanently, "/station/"+stat.Id) } func routeChooser(c *gin.Context) { -- GitLab