From 15babd5f492e2d41afdbcd50c68bf6ad638776b5 Mon Sep 17 00:00:00 2001 From: Maximiliano Garcia Silva Date: Wed, 7 Dec 2022 20:21:48 -0300 Subject: [PATCH] fix examples of push gateway in README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b0484861..4f4faa30 100644 --- a/README.md +++ b/README.md @@ -491,21 +491,21 @@ const client = require('prom-client'); let gateway = new client.Pushgateway('http://127.0.0.1:9091'); gateway.pushAdd({ jobName: 'test' }) - .then({resp, body} => { + .then(({resp, body}) => { /* ... */ }) .catch(err => { /* ... */ })); //Add metric and overwrite old ones gateway.push({ jobName: 'test' }) - .then({resp, body} => { + .then(({resp, body}) => { /* ... */ }) .catch(err => { /* ... */ })); //Overwrite all metrics (use PUT) gateway.delete({ jobName: 'test' }) - .then({resp, body} => { + .then(({resp, body}) => { /* ... */ }) .catch(err => { @@ -514,7 +514,7 @@ gateway.delete({ jobName: 'test' }) //All gateway requests can have groupings on it gateway.pushAdd({ jobName: 'test', groupings: { key: 'value' } }) - .then({resp, body} => { + .then(({resp, body}) => { /* ... */ }) .catch(err => {