gemcap-be-common 1.4.10 → 1.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/db/user-logs.db.js
CHANGED
|
@@ -12,6 +12,9 @@ const createLog = async (params) => {
|
|
|
12
12
|
if (!createLogs) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
+
if (!params.userId) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
15
18
|
const newUserLog = new UserLog_model_1.UserLog({
|
|
16
19
|
timestamp: params.timestamp ? params.timestamp : new Date(),
|
|
17
20
|
logType: params.logType,
|
package/db/user-logs.db.ts
CHANGED
|
@@ -21,6 +21,9 @@ export const createLog = async (params: ICreateLogParams) => {
|
|
|
21
21
|
if (!createLogs) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
+
if (!params.userId) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
24
27
|
const newUserLog = new UserLog({
|
|
25
28
|
timestamp: params.timestamp ? params.timestamp : new Date(),
|
|
26
29
|
logType: params.logType,
|
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ export declare class ComplianceBorrowersService {
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
getFullComplianceBorrowerById(complianceBorrowerId: string): Promise<any>;
|
|
48
|
-
getAllBorrowersShortened(userAccess: any): Promise<(Pick<IComplianceBorrowerDocument, "
|
|
48
|
+
getAllBorrowersShortened(userAccess: any): Promise<(Pick<IComplianceBorrowerDocument, "borrower" | "fundingStatus" | "items"> | {
|
|
49
49
|
items: {
|
|
50
50
|
instances: any[];
|
|
51
51
|
item: import("../models/ComplianceItem.model").IComplianceItemDocument;
|
|
@@ -25,16 +25,12 @@
|
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
import express from 'express';
|
|
27
27
|
import { IUserRole, IUser, IUserAccess } from '../interfaces/auth-user.interface';
|
|
28
|
-
interface
|
|
29
|
-
keycloakHost: string;
|
|
30
|
-
realm: string;
|
|
31
|
-
adminUser: string;
|
|
32
|
-
adminPass: string;
|
|
28
|
+
interface IAuthConfig {
|
|
33
29
|
baseUrl: string;
|
|
34
30
|
}
|
|
35
31
|
export declare class UsersService {
|
|
36
32
|
private readonly config;
|
|
37
|
-
constructor(config:
|
|
33
|
+
constructor(config: IAuthConfig);
|
|
38
34
|
getUserAccessByRequest(req: express.Request): Promise<IUser | null>;
|
|
39
35
|
getUserById(userId: string): Promise<IUser>;
|
|
40
36
|
getUserByUsername(username: string): Promise<IUser>;
|
|
@@ -7,18 +7,14 @@ import { UserMobileAccess } from '../models/UserMobileAccess.model';
|
|
|
7
7
|
import { UserLog } from '../models/UserLog.model';
|
|
8
8
|
import { IUserRole, IUser, IUserAccess } from '../interfaces/auth-user.interface';
|
|
9
9
|
|
|
10
|
-
interface
|
|
11
|
-
keycloakHost: string;
|
|
12
|
-
realm: string;
|
|
13
|
-
adminUser: string;
|
|
14
|
-
adminPass: string;
|
|
10
|
+
interface IAuthConfig {
|
|
15
11
|
baseUrl: string;
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
export class UsersService {
|
|
19
|
-
private readonly config:
|
|
15
|
+
private readonly config: IAuthConfig;
|
|
20
16
|
|
|
21
|
-
constructor(config:
|
|
17
|
+
constructor(config: IAuthConfig) {
|
|
22
18
|
this.config = config;
|
|
23
19
|
}
|
|
24
20
|
|