Commit 304221ba authored by Varunkumar Manohar's avatar Varunkumar Manohar
Browse files

fix: make sub-to-email default and set cache expiry to one hour for user assoc svc responses

parent f230454a
Pipeline #67820 passed with stages
in 12 minutes and 20 seconds
......@@ -183,6 +183,7 @@ paths:
name: subid-to-email
in: query
type: boolean
default: true
enum:
- true
- false
......@@ -1161,6 +1162,7 @@ paths:
name: subid-to-email
in: query
type: boolean
default: true
enum:
- true
- false
......
......@@ -191,6 +191,7 @@ paths:
type: boolean
- description: 'If the dataset creator value is a subid, then enable conversion of it to email'
name: subid-to-email
default: true
in: query
type: boolean
enum:
......@@ -1163,6 +1164,7 @@ paths:
default: common
- description: 'Convert subid value of subproject admin to email'
name: subid-to-email
default: true
in: query
type: boolean
enum:
......
......@@ -9,8 +9,8 @@ export class DESUserAssociation {
private static _cache: Cache<string>;
// User association details cached for a day
private static _cacheEntryTTL = 86400;
// User association details cached for an hour
private static _cacheEntryTTL = 3600;
public static async convertSubIdToEmail(appkey: string, subId: string, dataPartitionID: string): Promise<string> {
......
......@@ -256,7 +256,7 @@ export class DatasetHandler {
// parse user request
const userInput = DatasetParser.get(req);
const datasetIN = userInput[0];
const convertSubIdToEmail = userInput[2];
const convertSubIdToEmail = (userInput[2] !== undefined) ? userInput[2] : true;
// retrieve journalClient client
const journalClient = JournalFactoryTenantClient.get(tenant);
......
......@@ -192,7 +192,7 @@ export class SubProjectHandler {
// init journalClient client
const journalClient = JournalFactoryTenantClient.get(tenant);
const convertSubIdToEmail = req.query['subid-to-email'] === 'true';
const convertSubIdToEmail = (req.query['subid-to-email'] !== undefined) ? req.query['subid-to-email'] : 'true';
// get subproject
const subproject = await SubProjectDAO.get(journalClient, tenant.name, req.params.subprojectid);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment