Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80076

External Api "default" boolean return structure

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Incomplete
    • Icon: Minor Minor
    • None
    • 4.3
    • Web Services
    • None
    • MOODLE_403_STABLE

      It would be "helpful" if the external_api implemented a simple "true/false" or "success" return structure that we could just return instead of having to manually construct a simple "result (boolean) type structure.

      Something along the lines of, so that we don't all have to simply reproduce the same _returns() function.

       

      new \external_single_structure([
          'result' => new \external_value(PARAM_BOOL, 'True or false')
      ]);
      

      Or alternatively just allow the web services to wrap any web service method with a success result if it doesn't throw an exception or return a value.

       

            Unassigned Unassigned
            mhughes2k Michael Hughes
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.