Skip to content

Commit 688da49

Browse files
committed
1 parent 8b67ff8 commit 688da49

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

lib/corpus.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function addRoleToUserInfo({
3535
debug(`${new Date()} In addRoleToUser ${JSON.stringify(userPermission)} to ${userPermission.username} on ${connection.dbname}`);
3636
const connect = `${couchConnectUrl}/_users`;
3737
const db = nano({
38-
requestDefaults: {
38+
agentOptions: {
3939
headers: {
4040
'x-request-id': req.id,
4141
},
@@ -312,15 +312,15 @@ function createNewCorpus({
312312
};
313313
const docsNeededForAProperFieldDBCorpus = createPlaceholderDocsForCorpus({ corpusObject, user, req });
314314
const server = nano({
315-
requestDefaults: {
315+
agentOptions: {
316316
headers: {
317317
'x-request-id': req.id || '',
318318
},
319319
},
320320
url: couchConnectUrl,
321321
});
322322
const newDatabase = nano({
323-
requestDefaults: {
323+
agentOptions: {
324324
headers: {
325325
'x-request-id': req.id || '',
326326
},
@@ -405,7 +405,7 @@ function createNewCorpus({
405405
debug(`${new Date()} Corpus activity feed successfully replicated.`, couchActivityFeedResponse);
406406
// Set up security on new corpus activity feed
407407
const activityDb = nano({
408-
requestDefaults: {
408+
agentOptions: {
409409
headers: {
410410
'x-request-id': req.id,
411411
},
@@ -470,7 +470,7 @@ function isRequestingUserAnAdminOnCorpus({
470470
* Check to see if the user is an admin on the corpus
471471
*/
472472
const nanoforpermissions = nano({
473-
requestDefaults: {
473+
agentOptions: {
474474
headers: {
475475
'x-request-id': req.id || '',
476476
},

lib/corpusmanagement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function changeUsersPassword({
2121
newpassword,
2222
}) {
2323
const usersdb = nano({
24-
requestDefaults: {
24+
agentOptions: {
2525
headers: {
2626
'x-request-id': 'changeUsersPassword', // req.id || '',
2727
},

lib/user.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function createCouchDBUser({
8686
}
8787
debug('createCouchDBUser whichUserGroup', whichUserGroup);
8888
const couchdb = nano({
89-
requestDefaults: {
89+
agentOptions: {
9090
headers: {
9191
'x-request-id': req.id || '',
9292
},
@@ -139,7 +139,7 @@ function createCouchDBUser({
139139
debug(`${new Date()} User activity feed successfully replicated.`, couchActivityFeedResponse);
140140
// Set up security on new user activity feed
141141
const activityDb = nano({
142-
requestDefaults: {
142+
agentOptions: {
143143
headers: {
144144
'x-request-id': req.id || '',
145145
},
@@ -206,7 +206,7 @@ function fetchCorpusPermissions({
206206
}
207207
debug(`${new Date()} ${requestingUser} requested the team on ${dbname}`);
208208
const nanoforpermissions = nano({
209-
requestDefaults: {
209+
agentOptions: {
210210
headers: {
211211
'x-request-id': req.id || '',
212212
},
@@ -445,7 +445,7 @@ function saveUpdateUserToDatabase({
445445

446446
// Preparing the couch connection
447447
const usersdb = nano({
448-
requestDefaults: {
448+
agentOptions: {
449449
headers: {
450450
'x-request-id': req.id || '',
451451
},
@@ -508,7 +508,7 @@ function findByUsername({
508508
}
509509

510510
const usersdb = nano({
511-
requestDefaults: {
511+
agentOptions: {
512512
headers: {
513513
'x-request-id': req.id || '',
514514
},
@@ -582,7 +582,7 @@ function findByEmail({
582582
}
583583
usersQuery = `${usersQuery}?key="${email}"`;
584584
const usersdb = nano({
585-
requestDefaults: {
585+
agentOptions: {
586586
headers: {
587587
'x-request-id': req.id || '',
588588
},
@@ -1501,7 +1501,7 @@ function registerNewUser({
15011501
// debug(`${new Date()} There was success in creating the corpus: ${JSON.stringify(result.info)}\n`);
15021502
// /* Save corpus, datalist and session docs so that apps can load the dashboard for the user */
15031503
// const db = nano({
1504-
// requestDefaults: {
1504+
// agentOptions: {
15051505
// headers: {
15061506
// 'x-request-id': req.id,
15071507
// },

0 commit comments

Comments
 (0)