Skip to content

Commit 839b61b

Browse files
committed
fix api spam requests (loop) (partial correction)
1 parent 31facd6 commit 839b61b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/managers/application/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ export class ApplicationManager {
2525
async get(applicationId: string): Promise<Application>;
2626
async get(
2727
applicationId?: string,
28-
): Promise<Application | Collection<string, BaseApplication>> {
28+
): Promise<
29+
Application | BaseApplication | Collection<string, BaseApplication>
30+
> {
2931
const { response } = await this.client.api.user();
3032
const user = new User(this.client, response);
3133

@@ -40,7 +42,7 @@ export class ApplicationManager {
4042
throw new SquareCloudAPIError("APP_NOT_FOUND");
4143
}
4244

43-
return application.fetch();
45+
return application;
4446
}
4547

4648
return user.applications;

0 commit comments

Comments
 (0)