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 /> <TitleBox />
<div class="startpage__buttonline"> <div class="startpage__buttonline">
<template v-if="!$fetchState.pending"> <template v-if="!$fetchState.pending">
<template v-if="user && user.id"> <template v-if="user && user.name">
<NuxtLink class="startpage__playbutton" to="/play"> <NuxtLink class="startpage__playbutton" to="/play">
Play! Play!
</NuxtLink> </NuxtLink>

View File

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

View File

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