Skip to content

Commit 040d849

Browse files
authored
Merge pull request #47 from myDevicesIoT/feat/replace-admin
feat: replace admin user
2 parents 5c2be7d + 259816b commit 040d849

File tree

5 files changed

+66
-0
lines changed

5 files changed

+66
-0
lines changed

lib/Services/cayenne.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,17 @@ class Cayenne extends Request {
10271027
return this.send('POST', path, opts);
10281028
}
10291029

1030+
/**
1031+
* @param {Object} payload
1032+
* @param {Object} ops
1033+
*/
1034+
replaceUsers(payload, opts) {
1035+
const path = `/replace/users`;
1036+
opts = { response: 300000, deadline: 310000, ...opts };
1037+
opts.payload = payload;
1038+
return this.send('POST', path, opts);
1039+
}
1040+
10301041
/**
10311042
* * End Applications
10321043
*/

lib/Services/delorean-es.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,28 @@ class DeloreanES extends Request {
168168

169169
return this.send('POST', path, { payload });
170170
}
171+
172+
/**
173+
* @param {Object} payload
174+
* @param {Object} opts
175+
*/
176+
migrateUser(payload, opts) {
177+
const path = `/move/users`;
178+
opts = { response: 300000, deadline: 310000, ...opts };
179+
opts.payload = payload;
180+
return this.send('POST', path, opts);
181+
}
182+
183+
/**
184+
* @param {Object} payload
185+
* @param {Object} ops
186+
*/
187+
replaceUsers(payload, opts) {
188+
const path = `/replace/users`;
189+
opts = { response: 300000, deadline: 310000, ...opts };
190+
opts.payload = payload;
191+
return this.send('POST', path, opts);
192+
}
171193
}
172194

173195
module.exports = DeloreanES;

lib/Services/executor.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,17 @@ class Executor extends Request {
270270
opts.payload = payload;
271271
return this.send('POST', path, opts);
272272
}
273+
274+
/**
275+
* @param {Object} payload
276+
* @param {Object} ops
277+
*/
278+
replaceUsers(payload, opts) {
279+
const path = `/replace/users`;
280+
opts = { response: 300000, deadline: 310000, ...opts };
281+
opts.payload = payload;
282+
return this.send('POST', path, opts);
283+
}
273284
}
274285

275286
module.exports = Executor;

lib/Services/hermes.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,17 @@ class Hermes extends Request {
179179
opts.payload = payload;
180180
return this.send('POST', path, opts);
181181
}
182+
183+
/**
184+
* @param {Object} payload
185+
* @param {Object} ops
186+
*/
187+
replaceUsers(payload, opts) {
188+
const path = `/replace/users`;
189+
opts = { response: 300000, deadline: 310000, ...opts };
190+
opts.payload = payload;
191+
return this.send('POST', path, opts);
192+
}
182193
}
183194

184195
module.exports = Hermes;

lib/Services/timekeeper.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,17 @@ class Timekeeper extends Request {
106106
opts.payload = payload;
107107
return this.send('POST', path, opts);
108108
}
109+
110+
/**
111+
* @param {Object} payload
112+
* @param {Object} ops
113+
*/
114+
replaceUsers(payload, opts) {
115+
const path = `/replace/users`;
116+
opts = { response: 300000, deadline: 310000, ...opts };
117+
opts.payload = payload;
118+
return this.send('POST', path, opts);
119+
}
109120
}
110121

111122
module.exports = Timekeeper;

0 commit comments

Comments
 (0)