Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Data Map: storing entity id array, removed filename and filepath #729

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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