diff --git a/datastores/mysql.go b/datastores/mysql.go index b7953e5..282f6a8 100644 --- a/datastores/mysql.go +++ b/datastores/mysql.go @@ -161,7 +161,7 @@ func (ds Mysql) generateProtoProfile(profile milpacs.Profile) (*proto.Profile, e RankFull: profile.Rank.Title, RankImageUrl: profile.Rank.ImageURL(), }, - RealName: profile.RealName, + RealName: profile.UnmarshalCustomFields().RealName, UniformUrl: profile.UniformUrl(), Roster: proto.RosterType(profile.RosterId), Primary: &proto.Position{ @@ -292,7 +292,7 @@ func (ds Mysql) generateLiteProtoProfile(profile milpacs.Profile) (*proto.LitePr RankFull: profile.Rank.Title, RankImageUrl: profile.Rank.ImageURL(), }, - RealName: profile.RealName, + RealName: profile.UnmarshalCustomFields().RealName, UniformUrl: profile.UniformUrl(), Roster: proto.RosterType(profile.RosterId), Primary: &proto.Position{ @@ -380,7 +380,7 @@ func (ds Mysql) generateS1UniformsProtoProfile(profile milpacs.Profile) (*proto. RankFull: profile.Rank.Title, RankImageUrl: profile.Rank.ImageURL(), }, - RealName: profile.RealName, + RealName: profile.UnmarshalCustomFields().RealName, UniformUrl: profile.UniformUrl(), UniformDate: getUniformDate(profile), UniformUpdateTriggerDate: getUniformUpdateTriggerDate(profile), diff --git a/milpacs/profiles.go b/milpacs/profiles.go index 13ba59d..5bf0f0b 100644 --- a/milpacs/profiles.go +++ b/milpacs/profiles.go @@ -32,7 +32,7 @@ type Profile struct { RosterId uint64 UserID uint64 Username string - RealName string + //RealName string RealName is now a custom field PositionID uint64 SecondaryPositionIds string RankID uint64 @@ -59,6 +59,7 @@ func (profile *Profile) UniformUrl() string { } type CustomFields struct { + RealName string `json:"realName"` JoinDate string `json:"joinDate"` PromoDate string `json:"promoDate"` ConsoleGamertag string `json:"consoleGamertag"` diff --git a/servers/server.go b/servers/server.go index 9f2fd01..5148e7f 100644 --- a/servers/server.go +++ b/servers/server.go @@ -20,6 +20,12 @@ package servers import ( "fmt" + "io" + "log" + "net" + "net/http" + "os" + "github.com/7cav/api/cache" "github.com/7cav/api/datastores" milpacs "github.com/7cav/api/proto" @@ -30,14 +36,9 @@ import ( "google.golang.org/grpc/grpclog" "gorm.io/driver/mysql" "gorm.io/gorm" - "io" - "log" - "net" - "net/http" - "os" ) -const version = "1.7.5" +const version = "1.7.6" type MicroServer struct { addr string diff --git a/third_party/OpenAPI/milpacs.swagger.json b/third_party/OpenAPI/milpacs.swagger.json index 3bad952..64ae217 100644 --- a/third_party/OpenAPI/milpacs.swagger.json +++ b/third_party/OpenAPI/milpacs.swagger.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "milpacs.proto", - "version": "1.7.5" + "version": "1.7.6" }, "tags": [ {