Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-110285

Add interfaces to at least 5 API endpoints

    XMLWordPrintable

    Details

      Description

      1. Open api-directory.interface.ts and find an api call that has 'any' in it.

      'certificateauthority.query': { params: any; response: any };

      2. Use api docs, inspector or your friendly backend developer to get information on proper response type.

      3. Document interface in `/app/interfaces` and update type in api directory.

      'certificateauthority.query': { params: QueryParams<CertificateAuthority>; response: CertificateAuthority[] };

      4. Find usages of this api call in code and clean up code related to it.

      For example, there may be any's next to it. Or it may be possible to rename some of the `res` variables to proper names.

      I.e. change: 

      this.services.getCAs().subscribe((res: any[]) => {}

      to

      this.services.getCAs().subscribe((authorities) => {}

      5. Repeat for at least 5 API endpoints (the more the better).

        Attachments

          Attachments

            JEditor

              Activity

                People

                Assignee:
                ryousaf Rehan Yousaf
                Reporter:
                istepanovych Ievgen Stepanovych
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 4 hours, 40 minutes
                    1d 4h 40m