update user command get all user access check

This commit is contained in:
AndrewZuo01 2024-01-08 10:41:17 +08:00
parent 33d456231d
commit 27e24a7f1c

View File

@ -483,6 +483,10 @@ func (s *userServer) ProcessUserCommandGet(ctx context.Context, req *pbuser.Proc
} }
func (s *userServer) ProcessUserCommandGetAll(ctx context.Context, req *pbuser.ProcessUserCommandGetAllReq) (*pbuser.ProcessUserCommandGetAllResp, error) { func (s *userServer) ProcessUserCommandGetAll(ctx context.Context, req *pbuser.ProcessUserCommandGetAllReq) (*pbuser.ProcessUserCommandGetAllResp, error) {
err := authverify.CheckAccessV3(ctx, req.UserID)
if err != nil {
return nil, err
}
// Fetch user commands from the database // Fetch user commands from the database
commands, err := s.UserDatabase.GetAllUserCommands(ctx, req.UserID) commands, err := s.UserDatabase.GetAllUserCommands(ctx, req.UserID)
if err != nil { if err != nil {