Skip to content

Commit

Permalink
added entity id array and removed filname and filepath from user data…
Browse files Browse the repository at this point in the history
… map (#729)
  • Loading branch information
ritikramuka authored Oct 5, 2023
1 parent 2e047ff commit 907e064
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions src/web/client/context/userDataMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,40 @@

export interface IUserData {
containerId: string;
fileName: string;
filePath: string;
userName: string;
userId: string;
}

export class UserData implements IUserData {
_containerId: string;
_fileName: string;
_filePath: string;
_userName: string;
_userId: string;
_entityId: string[];

// Getters
public get containerId(): string {
return this._containerId;
}
public get fileName(): string {
return this._fileName;
}
public get filePath(): string {
return this._filePath;
}
public get userName(): string {
return this._userName;
}
public get userId(): string {
return this._userId;
}
public get entityId(): string[] {
return this._entityId;
}

constructor(
containerId: string,
fileName: string,
filePath: string,
userName: string,
userId: string
userId: string,
entityId: string[]
) {
this._fileName = fileName;
this._containerId = containerId;
this._filePath = filePath;
this._userName = userName;
this._userId = userId;
this._entityId = entityId;
}
}

Expand All @@ -59,17 +51,15 @@ export class UserDataMap {

public setUserData(
containerId: string,
fileName: string,
filePath: string,
userName: string,
userId: string
userId: string,
entityId: string[]
) {
const userData = new UserData(
containerId,
fileName,
filePath,
userName,
userId
userId,
entityId
);

this.usersMap.set(userId, userData);
Expand Down

0 comments on commit 907e064

Please sign in to comment.