Compare commits

...
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -488,6 +488,7 @@ export class AuthController {
const userDto = { const userDto = {
id: api_key.user_id, id: api_key.user_id,
name: api_key.username, name: api_key.username,
email: api_key.username,
customer: { customer: {
id: api_key.customer_id, id: api_key.customer_id,
name: api_key.customer_name, name: api_key.customer_name,
@@ -502,7 +503,7 @@ export class AuthController {
const accessToken = req.cookies['ddf-auth']; const accessToken = req.cookies['ddf-auth'];
const refreshToken = req.cookies['ddf-refresh-auth']; const refreshToken = req.cookies['ddf-refresh-auth'];
const userId = req.cookies['ddf-user-id']; const userId = req.cookies['ddf-user-id'];
const resourceHost = req.headers["host"] const resourceHost = req.headers["x-original-url"] as string || "" ;
const hasUserSession = Boolean(accessToken) && Boolean(userId); const hasUserSession = Boolean(accessToken) && Boolean(userId);
this.logger.info('Has User Session: ' + hasUserSession); this.logger.info('Has User Session: ' + hasUserSession);
+2 -1
View File
@@ -437,7 +437,8 @@ export class AuthClientService implements OnModuleInit {
const userDto: UserDTO = { const userDto: UserDTO = {
id: user.id, id: user.id,
name: user.username, name: user.name,
email: user.email,
jobTitle: user?.jobTitle || null, jobTitle: user?.jobTitle || null,
department: user?.department || null, department: user?.department || null,
hierarchy: user?.hierarchy || null, hierarchy: user?.hierarchy || null,
+1
View File
@@ -144,6 +144,7 @@ export interface BulkEditResponse {
export type UserDTO = { export type UserDTO = {
id: string, id: string,
name: string, name: string,
email: string,
jobTitle?: string, jobTitle?: string,
department?: string, department?: string,
hierarchy?: string, hierarchy?: string,