Company Delete Endpoint done
This commit is contained in:
@ -140,6 +140,18 @@ func GetAllUserCompanyMap(o orm.Ormer, query map[string]string, fields []string,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// GetUserCompanyMapsByCompanyName retrieves all UserCompanyMap matches a certain company. Returns empty list if
|
||||
// no records exist
|
||||
func GetUserCompanyMapsByCompanyName(o orm.Ormer, companyName string) (l []UserCompanyMap, err error) {
|
||||
qs := o.QueryTable(new(UserCompanyMap)).Filter("company", companyName)
|
||||
|
||||
_, err = qs.All(&l)
|
||||
if err == nil {
|
||||
return l, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// UpdateUserCompanyMapById updates UserCompanyMap by Id and returns error if the record to be updated doesn't exist
|
||||
func UpdateUserCompanyMapById(o orm.Ormer, m *UserCompanyMap) (err error) {
|
||||
v := UserCompanyMap{ID: m.ID}
|
||||
|
Reference in New Issue
Block a user