Skip to content

Commit d7e9b0e

Browse files
committed
feat: add current deploy method
1 parent 2da679a commit d7e9b0e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.changeset/cold-socks-speak.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@squarecloud/api": minor
3+
---
4+
5+
New `Application#deploys#current` method for getting the current deployment URL

src/managers/application/deploys.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,15 @@ export class ApplicationDeploysManager {
3131

3232
return data?.response;
3333
}
34+
35+
/**
36+
* Gets the current deployment URL
37+
*/
38+
async current() {
39+
const data = await this.application.client.api.request(
40+
Routes.apps.deployments.current(this.application.id),
41+
);
42+
43+
return data?.response;
44+
}
3445
}

0 commit comments

Comments
 (0)