Lager - v5.2.0
    Preparing search index...
    • Function

      Fetches all invoices from the API.

      This function retrieves a JWT token from SecureStore and uses it to authenticate a GET request to the API. The request fetches all invoices and returns the response data. If an error occurs during the request, it is caught and logged. In the case of an error, the function returns an empty array.

      getInvoices

      Returns Promise<Invoice[]>

      The response data from the API, which contains an array of invoices, or an empty array if an error occurs.

      If there is an error during the request, it is caught and logged.