Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions datastores/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion milpacs/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"`
Expand Down
13 changes: 7 additions & 6 deletions servers/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion third_party/OpenAPI/milpacs.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "milpacs.proto",
"version": "1.7.5"
"version": "1.7.6"
},
"tags": [
{
Expand Down