Skip to content

Commit 15babd5

Browse files
mrfussionzbjornson
authored andcommitted
fix examples of push gateway in README.md
1 parent a6e3510 commit 15babd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -491,21 +491,21 @@ const client = require('prom-client');
491491
let gateway = new client.Pushgateway('http://127.0.0.1:9091');
492492

493493
gateway.pushAdd({ jobName: 'test' })
494-
.then({resp, body} => {
494+
.then(({resp, body}) => {
495495
/* ... */
496496
})
497497
.catch(err => {
498498
/* ... */
499499
})); //Add metric and overwrite old ones
500500
gateway.push({ jobName: 'test' })
501-
.then({resp, body} => {
501+
.then(({resp, body}) => {
502502
/* ... */
503503
})
504504
.catch(err => {
505505
/* ... */
506506
})); //Overwrite all metrics (use PUT)
507507
gateway.delete({ jobName: 'test' })
508-
.then({resp, body} => {
508+
.then(({resp, body}) => {
509509
/* ... */
510510
})
511511
.catch(err => {
@@ -514,7 +514,7 @@ gateway.delete({ jobName: 'test' })
514514

515515
//All gateway requests can have groupings on it
516516
gateway.pushAdd({ jobName: 'test', groupings: { key: 'value' } })
517-
.then({resp, body} => {
517+
.then(({resp, body}) => {
518518
/* ... */
519519
})
520520
.catch(err => {

0 commit comments

Comments
 (0)