From c01a5fd7633c0a89e246813e1ad8688b097ae44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Tue, 29 Oct 2024 13:25:51 +0000 Subject: [PATCH] fix: add user accessor --- adapters/adapter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/adapters/adapter.go b/adapters/adapter.go index dc04ee0..e7ea7ba 100644 --- a/adapters/adapter.go +++ b/adapters/adapter.go @@ -121,6 +121,11 @@ type GothSession struct { DeletedAt gorm.DeletedAt `json:"deleted_at"` } +// GetUser returns the user of the session. +func (s *GothSession) GetUser() GothUser { + return s.User +} + // GothCsrfToken is a CSRF token for a user type GothCsrfToken struct { // ID is the unique identifier of the CSRF token.