Compare commits
1 Commits
master
...
ZIP-partic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecf57cdc30 |
@@ -27,7 +27,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
zipcodeTrimLength = 5
|
zipcodeTrimLength = 5
|
||||||
|
enableZipParticipationCheck = true
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -408,14 +409,6 @@ func (c *controller) handleMember(ctx echo.Context) error {
|
|||||||
eligibility.ServiceInfo.DateOfService = time.Now()
|
eligibility.ServiceInfo.DateOfService = time.Now()
|
||||||
eligibility.ServiceInfo.ServiceTypeCodes = []string{"30"}
|
eligibility.ServiceInfo.ServiceTypeCodes = []string{"30"}
|
||||||
|
|
||||||
/*
|
|
||||||
resp, err := c.bcbsi.BXE.Get271(eligibility)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("Eligibility Not Found or Error: ", err.Error())
|
|
||||||
return routeutils.ResponseAPINotEligibleError(ctx)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//This part is emulating eligibility check for testing purposes
|
//This part is emulating eligibility check for testing purposes
|
||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
eligibilityJson, err := json.Marshal(eligibility)
|
eligibilityJson, err := json.Marshal(eligibility)
|
||||||
@@ -468,10 +461,11 @@ func (c *controller) handleMember(ctx echo.Context) error {
|
|||||||
trimmedZipcode = cleanZipcode[:zipcodeTrimLength]
|
trimmedZipcode = cleanZipcode[:zipcodeTrimLength]
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = c.svc.Zipcodes.GetByParticipatingZipcode(trimmedZipcode)
|
if enableZipParticipationCheck {
|
||||||
|
_, err = c.svc.Zipcodes.GetByParticipatingZipcode(trimmedZipcode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return routeutils.ResponseAPINotEligibleWithMessageError(ctx, "Member's Home zipcode, "+trimmedZipcode+", is not currently eligible for participation in this program")
|
return routeutils.ResponseAPINotEligibleWithMessageError(ctx, "Member's Home zipcode, "+trimmedZipcode+", is not currently eligible for participation in this program")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
googleMapsAPI, err := maps.NewClient(maps.WithClientIDAndSignature("gme-bluecrossandblue1", "msqgD-jdqCyR0M_1u5C1HION5iI="))
|
googleMapsAPI, err := maps.NewClient(maps.WithClientIDAndSignature("gme-bluecrossandblue1", "msqgD-jdqCyR0M_1u5C1HION5iI="))
|
||||||
|
|||||||
Reference in New Issue
Block a user