Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Update src/client.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Ignacio Rodríguez <ignacio@fosfori.to>
  • Loading branch information
mikiodehartj1 and i5o authored Jun 18, 2024
1 parent 9d71402 commit 3a1dd7d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,17 @@ export class APIClient {
public async iterateCustomProfiles(
iteratee: ResourceIteratee<CustomProfiles>,
) {
const page = 1;
const endpoint = this.withBaseUri('/api/v1/library/custom-profiles', {
page: `${page}`,
page: 1
});

const body = await this.request<CustomProfiles[]>(endpoint);
console.log(body);
const results = (body as any).results;

for (const result of results) {
await iteratee(result);
}
}

public async iterateDevices(iteratee: ResourceIteratee<Device>) {
let offset = 0;
let length = 0;
Expand Down

0 comments on commit 3a1dd7d

Please sign in to comment.