Upstream sync
This commit is contained in:
@@ -27,7 +27,7 @@ func (c *providerRepo) getProfileQuery(user entity.User) (query string, where st
|
||||
if len(user.Profiles) > 0 {
|
||||
for _, p := range user.Profiles {
|
||||
switch p.Key {
|
||||
case "AD", "BCBSIAD", "BDCAD", "PLANAD":
|
||||
case "AD", "BCBSIAD", "BDCAD", "PLANAD", "VIRPT":
|
||||
return
|
||||
case "SP", "SPT":
|
||||
switch p.Organization.Type.Key {
|
||||
@@ -145,6 +145,20 @@ func (c *providerRepo) GetByUUID(providerUUID string, user entity.User) (entity.
|
||||
return c.parseEntity(c.conn.QueryRow(query, lat, long, lat, providerUUID))
|
||||
}
|
||||
|
||||
func (c *providerRepo) GetByID(providerID int64, user entity.User) (entity.Provider, error) {
|
||||
lat := 41.886406
|
||||
long := -87.624225
|
||||
|
||||
query, where, err := c.getProfileQuery(user)
|
||||
if err != nil {
|
||||
return entity.Provider{}, err
|
||||
}
|
||||
|
||||
query = c.getSelectQueryBase() + query + " WHERE a.provider_id = ? " + where
|
||||
|
||||
return c.parseEntity(c.conn.QueryRow(query, lat, long, lat, providerID))
|
||||
}
|
||||
|
||||
func (c *providerRepo) GetByMukID(mukID string, user entity.User) (entity.Provider, error) {
|
||||
lat := 41.886406
|
||||
long := -87.624225
|
||||
|
||||
Reference in New Issue
Block a user