Skip to content

Commit

Permalink
[fix] DB構造変更に伴う修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yoneyan committed Mar 15, 2021
1 parent 57b88d2 commit 0e9f3f6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/api/core/group/info/v0/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func Get(c *gin.Context) {
infoInterface = append(infoInterface, info.Info{
ServiceID: serviceID,
Service: tmpService.ServiceTemplate.Name,
ASN: tmpService.ASN,
ASN: *tmpService.ASN,
V4: v4,
V6: v6,
NOC: tmpConnection.NOC.Name,
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/core/group/service/v0/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func AddAdmin(c *gin.Context) {
ServiceNumber: number,
Org: input.Org,
OrgEn: input.OrgEn,
Postcode: input.Postcode,
PostCode: input.Postcode,
Address: input.Address,
AddressEn: input.AddressEn,
RouteV4: input.RouteV4,
Expand All @@ -149,7 +149,7 @@ func AddAdmin(c *gin.Context) {
MaxUpstream: input.MaxUpstream,
AveDownstream: input.AveDownstream,
MaxDownstream: input.MaxDownstream,
ASN: input.ASN,
ASN: &[]uint{input.ASN}[0],
Fee: &[]uint{0}[0],
IP: grpIP,
JPNICAdmin: input.JPNICAdmin,
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/core/group/service/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func Add(c *gin.Context) {
ServiceNumber: number,
Org: input.Org,
OrgEn: input.OrgEn,
Postcode: input.Postcode,
PostCode: input.Postcode,
Address: input.Address,
AddressEn: input.AddressEn,
RouteV4: input.RouteV4,
Expand All @@ -152,7 +152,7 @@ func Add(c *gin.Context) {
MaxUpstream: input.MaxUpstream,
AveDownstream: input.AveDownstream,
MaxDownstream: input.MaxDownstream,
ASN: input.ASN,
ASN: &[]uint{input.ASN}[0],
Fee: &[]uint{0}[0],
IP: grpIP,
JPNICAdmin: input.JPNICAdmin,
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/core/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ type Service struct {
ServiceNumber uint `json:"service_number"`
Org string `json:"org"`
OrgEn string `json:"org_en"`
Postcode string `json:"postcode"`
PostCode string `json:"postcode"`
Address string `json:"address"`
AddressEn string `json:"address_en"`
ASN uint `json:"asn"`
ASN *uint `json:"asn"`
RouteV4 string `json:"route_v4"`
RouteV6 string `json:"route_v6"`
V4Name string `json:"v4_name"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/store/group/service/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func Update(base int, c core.Service) error {
result = db.Model(&core.Service{Model: gorm.Model{ID: c.ID}}).Update(core.Service{
Org: c.Org,
OrgEn: c.OrgEn,
Postcode: c.Postcode,
PostCode: c.PostCode,
Address: c.Address,
AddressEn: c.AddressEn,
RouteV4: c.RouteV4,
Expand All @@ -65,7 +65,7 @@ func Update(base int, c core.Service) error {
GroupID: c.GroupID,
Org: c.Org,
OrgEn: c.Org,
Postcode: c.Postcode,
PostCode: c.PostCode,
Address: c.Address,
AddressEn: c.AddressEn,
ASN: c.ASN,
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/store/group/service/v0/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestAddJPNICTech(t *testing.T) {
ServiceNumber: 0,
Org: "HomeNOC",
OrgEn: "",
Postcode: "",
PostCode: "",
Address: "",
AddressEn: "",
ASN: 0,
Expand Down

0 comments on commit 0e9f3f6

Please sign in to comment.