api_func_auth_list.go 425 B

1234567891011121314151617181920
  1. package route
  2. import (
  3. "encoding/json"
  4. "opennamu/route/tool"
  5. )
  6. func Api_func_auth_list(call_arg []string) string {
  7. other_set := map[string]string{}
  8. json.Unmarshal([]byte(call_arg[0]), &other_set)
  9. db := tool.DB_connect()
  10. defer db.Close()
  11. auth_name := tool.Get_user_auth(db, other_set["ip"])
  12. auth_info := tool.Get_auth_group_info(db, auth_name)
  13. json_data, _ := json.Marshal(auth_info)
  14. return string(json_data)
  15. }