This commit is contained in:
Settel 2021-08-04 17:35:50 +02:00
parent 1ad0d0579d
commit b9886c3775
3 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<TitleBox />
<div class="startpage__buttonline">
<template v-if="!$fetchState.pending">
<template v-if="user && user.id">
<template v-if="user && user.name">
<NuxtLink class="startpage__playbutton" to="/play">
Play!
</NuxtLink>

View File

@ -12,6 +12,7 @@ func (authMux *AuthMux) createCookie() *http.Cookie {
Path: "/",
HttpOnly: true,
MaxAge: -1,
SameSite: http.SameSiteLaxMode,
}
}

View File

@ -7,8 +7,8 @@ import (
)
type userLight struct {
Name string "json:`name`"
Role string "json:`role`"
Name string `json:"name"`
Role string `json:"role"`
}
func (authMux *AuthMux) GetUserInfo(w http.ResponseWriter, r *http.Request) {