File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -157,12 +157,20 @@ class Agent {
157
157
if ( agent . connected ) {
158
158
// console.log(`${agent.options.forgeURL}/api/v1/teams/${agent.options.team}/brokers/${agent.options.broker}/topics`)
159
159
// console.log(JSON.stringify(agent.topics, null, 2))
160
+ const upload = [ ]
161
+ Object . keys ( agent . topics ) . forEach ( ( key ) => {
162
+ upload . push ( {
163
+ topic : key ,
164
+ type : agent . topics [ key ] . type ,
165
+ timestamp : agent . topics [ key ] . timestamp
166
+ } )
167
+ } )
160
168
try {
161
169
await got . post ( `${ agent . options . forgeURL } /api/v1/teams/${ agent . options . team } /brokers/${ agent . options . broker } /topics` , {
162
170
headers : {
163
171
Authorization : `Bearer ${ this . options . token } `
164
172
} ,
165
- json : agent . topics
173
+ json : upload
166
174
} )
167
175
// clear list so only uploading new topics each time
168
176
agent . topics = { }
You can’t perform that action at this time.
0 commit comments