From 3393f751a07292ea2b9fb84e63b58611c28de308 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 21 Feb 2024 20:40:39 +0800 Subject: [PATCH] :card_file_box: Update models --- pkg/grpc/proto/auth.proto | 11 ++++++----- pkg/server/auth_middleware.go | 2 -- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/grpc/proto/auth.proto b/pkg/grpc/proto/auth.proto index c707a5d..d9aa54f 100644 --- a/pkg/grpc/proto/auth.proto +++ b/pkg/grpc/proto/auth.proto @@ -9,11 +9,12 @@ service Auth { } message Userinfo { - string name = 1; - string nick = 2; - string email = 3; - string avatar = 4; - optional string description = 5; + uint64 id = 1; + string name = 2; + string nick = 3; + string email = 4; + string avatar = 5; + optional string description = 6; } message AuthRequest { diff --git a/pkg/server/auth_middleware.go b/pkg/server/auth_middleware.go index b23a327..09d8d6b 100644 --- a/pkg/server/auth_middleware.go +++ b/pkg/server/auth_middleware.go @@ -3,7 +3,6 @@ package server import ( "code.smartsheep.studio/hydrogen/identity/pkg/security" "code.smartsheep.studio/hydrogen/identity/pkg/services" - "fmt" "github.com/gofiber/fiber/v2" "strings" ) @@ -21,7 +20,6 @@ func authMiddleware(c *fiber.Ctx) error { c.Locals("token", token) if err := authFunc(c); err != nil { - fmt.Println("Watch out!", err) return err }