diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 8b424ea..9e3de01 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,12 +4,7 @@
-
-
-
-
-
-
+
@@ -155,7 +150,6 @@
-
@@ -180,7 +174,8 @@
-
+
+
true
diff --git a/go.mod b/go.mod
index ece4565..ad4ef4d 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.21.6
toolchain go1.22.1
require (
- git.solsynth.dev/hydrogen/dealer v0.0.0-20240824155914-68c6a5565468
+ git.solsynth.dev/hydrogen/dealer v0.0.0-20240911145828-d734d617bfc8
github.com/go-playground/validator/v10 v10.17.0
github.com/gofiber/fiber/v2 v2.52.4
github.com/golang-jwt/jwt/v5 v5.2.0
diff --git a/go.sum b/go.sum
index 6594594..bde1107 100644
--- a/go.sum
+++ b/go.sum
@@ -2,6 +2,8 @@ git.solsynth.dev/hydrogen/dealer v0.0.0-20240823113302-208da7e90fdb h1:dv4uVDMe5
git.solsynth.dev/hydrogen/dealer v0.0.0-20240823113302-208da7e90fdb/go.mod h1:Q51JPkKnV0UoOT/IRmdBh5CyfSlp7s8BRGzgooYHqkI=
git.solsynth.dev/hydrogen/dealer v0.0.0-20240824155914-68c6a5565468 h1:DZ1b5WA1FoUE71zyl6OzQ+QbCo4tPJv077ekM1VQ524=
git.solsynth.dev/hydrogen/dealer v0.0.0-20240824155914-68c6a5565468/go.mod h1:Q51JPkKnV0UoOT/IRmdBh5CyfSlp7s8BRGzgooYHqkI=
+git.solsynth.dev/hydrogen/dealer v0.0.0-20240911145828-d734d617bfc8 h1:kWheneSdSySG5tz9TAXrtr546JdMpQZTyWDFk4jeGwg=
+git.solsynth.dev/hydrogen/dealer v0.0.0-20240911145828-d734d617bfc8/go.mod h1:Q51JPkKnV0UoOT/IRmdBh5CyfSlp7s8BRGzgooYHqkI=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
diff --git a/pkg/internal/grpc/auth.go b/pkg/internal/grpc/auth.go
index 90e4afd..1e4509f 100644
--- a/pkg/internal/grpc/auth.go
+++ b/pkg/internal/grpc/auth.go
@@ -2,6 +2,7 @@ package grpc
import (
"context"
+
"git.solsynth.dev/hydrogen/passport/pkg/internal/database"
"git.solsynth.dev/hydrogen/passport/pkg/internal/models"
"github.com/samber/lo"
diff --git a/pkg/internal/grpc/realms.go b/pkg/internal/grpc/realms.go
index a9d6e59..1a056a3 100644
--- a/pkg/internal/grpc/realms.go
+++ b/pkg/internal/grpc/realms.go
@@ -3,6 +3,7 @@ package grpc
import (
"context"
"fmt"
+
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
"git.solsynth.dev/hydrogen/passport/pkg/internal/database"
"git.solsynth.dev/hydrogen/passport/pkg/internal/models"
@@ -18,7 +19,7 @@ func (v *Server) ListCommunityRealm(ctx context.Context, empty *proto.ListRealmR
return &proto.ListRealmResponse{
Data: lo.Map(realms, func(item models.Realm, index int) *proto.RealmInfo {
- return &proto.RealmInfo{
+ info := &proto.RealmInfo{
Id: uint64(item.ID),
Alias: item.Alias,
Name: item.Name,
@@ -26,6 +27,13 @@ func (v *Server) ListCommunityRealm(ctx context.Context, empty *proto.ListRealmR
IsPublic: item.IsPublic,
IsCommunity: item.IsCommunity,
}
+ if item.Avatar != nil {
+ info.Avatar = *item.Avatar
+ }
+ if item.Banner != nil {
+ info.Banner = *item.Banner
+ }
+ return info
}),
}, nil
}
@@ -42,7 +50,7 @@ func (v *Server) ListAvailableRealm(ctx context.Context, request *proto.LookupUs
return &proto.ListRealmResponse{
Data: lo.Map(realms, func(item models.Realm, index int) *proto.RealmInfo {
- return &proto.RealmInfo{
+ info := &proto.RealmInfo{
Id: uint64(item.ID),
Alias: item.Alias,
Name: item.Name,
@@ -50,6 +58,13 @@ func (v *Server) ListAvailableRealm(ctx context.Context, request *proto.LookupUs
IsPublic: item.IsPublic,
IsCommunity: item.IsCommunity,
}
+ if item.Avatar != nil {
+ info.Avatar = *item.Avatar
+ }
+ if item.Banner != nil {
+ info.Banner = *item.Banner
+ }
+ return info
}),
}, nil
}
@@ -66,7 +81,7 @@ func (v *Server) ListOwnedRealm(ctx context.Context, request *proto.LookupUserRe
return &proto.ListRealmResponse{
Data: lo.Map(realms, func(item models.Realm, index int) *proto.RealmInfo {
- return &proto.RealmInfo{
+ info := &proto.RealmInfo{
Id: uint64(item.ID),
Alias: item.Alias,
Name: item.Name,
@@ -74,6 +89,13 @@ func (v *Server) ListOwnedRealm(ctx context.Context, request *proto.LookupUserRe
IsPublic: item.IsPublic,
IsCommunity: item.IsCommunity,
}
+ if item.Avatar != nil {
+ info.Avatar = *item.Avatar
+ }
+ if item.Banner != nil {
+ info.Banner = *item.Banner
+ }
+ return info
}),
}, nil
}
@@ -99,14 +121,21 @@ func (v *Server) GetRealm(ctx context.Context, request *proto.LookupRealmRequest
return nil, err
}
- return &proto.RealmInfo{
+ info := &proto.RealmInfo{
Id: uint64(realm.ID),
Alias: realm.Alias,
Name: realm.Name,
Description: realm.Description,
IsPublic: realm.IsPublic,
IsCommunity: realm.IsCommunity,
- }, nil
+ }
+ if realm.Avatar != nil {
+ info.Avatar = *realm.Avatar
+ }
+ if realm.Banner != nil {
+ info.Banner = *realm.Banner
+ }
+ return info, nil
}
func (v *Server) ListRealmMember(ctx context.Context, request *proto.RealmMemberLookupRequest) (*proto.ListRealmMemberResponse, error) {