Skip to content

Commit 968ccc1

Browse files
EPMRPP-98982 || Update checkConnect() method (#221)
1 parent 37a50f5 commit 968ccc1

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
### Fixed
2+
- Updated the `checkConnect` method implementation to utilize the `GET launches` API endpoint, ensuring compatibility with both old and new API versions.
13

24
## [5.3.0] - 2024-09-23
35
### Changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ const rpClient = new RPClient({
4040
project: 'PROJECT_NAME'
4141
});
4242

43-
rpClient.checkConnect().then((response) => {
43+
rpClient.checkConnect().then(() => {
4444
console.log('You have successfully connected to the server.');
45-
console.log(`You are using an account: ${response.fullName}`);
4645
}, (error) => {
4746
console.log('Error connection to server');
4847
console.dir(error);

lib/report-portal-client.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ class RPClient {
130130
}
131131

132132
checkConnect() {
133-
const url = [this.config.endpoint.replace('/v2', '/v1'), 'user'].join('/');
133+
const url = [this.config.endpoint.replace('/v2', '/v1'), this.config.project, 'launch']
134+
.join('/')
135+
.concat('?page.page=1&page.size=1');
134136
return this.restClient.request('GET', url, {});
135137
}
136138

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)