doctor_api_controller.go 727B

123456789101112131415161718192021222324252627282930
  1. package mobile_api_controllers
  2. import (
  3. "Xcx_New/service"
  4. )
  5. type DoctorsApiController struct {
  6. MobileBaseAPIAuthController
  7. }
  8. func (c *DoctorsApiController) GetAllDoctorAndNurse() {
  9. adminUserInfo := c.GetMobileAdminUserInfo()
  10. doctors, nursers, _ := service.GetAllDoctorAndNurse(adminUserInfo.Org.Id, adminUserInfo.App.Id)
  11. c.ServeSuccessJSON(map[string]interface{}{
  12. "doctors": doctors,
  13. "nursers": nursers,
  14. })
  15. return
  16. }
  17. func (c *DoctorsApiController) GetAllAdminUsers() {
  18. //adminUserInfo := c.GetAdminUserInfo()
  19. adminUserInfo := c.GetMobileAdminUserInfo()
  20. users, _ := service.GetAllAdminUsers(adminUserInfo.Org.Id, adminUserInfo.App.Id)
  21. c.ServeSuccessJSON(map[string]interface{}{
  22. "users": users,
  23. })
  24. return
  25. }