2
This commit is contained in:
@@ -152,7 +152,7 @@ func (r *DoctorPharmacy) UnbindDoctorPharmacy(c *gin.Context) {
|
||||
pharmacyIdStr := c.Query("pharmacy_id")
|
||||
if pharmacyIdStr != "" {
|
||||
pharmacyId, err := strconv.ParseInt(pharmacyIdStr, 10, 64)
|
||||
if err == nil && pharmacyId > 0 {
|
||||
if err == nil && pharmacyId >= 0 {
|
||||
_, err = doctorPharmacyService.UnbindDoctorPharmacy(id, pharmacyId)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
@@ -236,7 +236,7 @@ func (r *DoctorPharmacy) SetDefaultDoctorPharmacy(c *gin.Context) {
|
||||
pharmacyIdStr := c.Query("pharmacy_id")
|
||||
if pharmacyIdStr != "" {
|
||||
pharmacyId, err := strconv.ParseInt(pharmacyIdStr, 10, 64)
|
||||
if err == nil && pharmacyId > 0 {
|
||||
if err == nil && pharmacyId >= 0 {
|
||||
_, err = doctorPharmacyService.SetDefaultPharmacy(id, pharmacyId)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
|
||||
Reference in New Issue
Block a user