-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat-mindmap]: adds mindmap feature #12
base: feat-mindmap
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left comments inline please address all the issues.
...createMindmapDto, | ||
userId: id, | ||
name, | ||
path: 'temp' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BULMA-OO lets get rid of this temp
form everywhere and make use to actual path where the files will be stored.
return this.mindmapService.create( | ||
createMindmapDto, | ||
request.user._id, | ||
request.user.firstName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BULMA-OO why are we sending user's firstName in the name property of mindmap?
|
||
async upload(mindmap: { name: string; content: string; path: string }) { | ||
const mindmapPayload = { | ||
name: mindmap?.name ?? new Types.ObjectId().toString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name
property refers to the doc._id
of the mindmap doc. But instead you are sending user.name in this property from the create
function of the controller.
const doc: any = await this.repository.findById(id); | ||
if (doc) { | ||
// 2. fetch content from s3 | ||
const key = doc.path; | ||
const key = doc.path + '/' + doc._id; | ||
const file = await this.fileService.getFile(key); | ||
return file; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const doc: any = await this.repository.findById(id); | |
if (doc) { | |
// 2. fetch content from s3 | |
const key = doc.path; | |
const key = doc.path + '/' + doc._id; | |
const file = await this.fileService.getFile(key); | |
return file; | |
} | |
const doc: Notes = await this.repository.findById(id); | |
if (doc) { | |
// 2. fetch content from s3 | |
const key = doc.path + '/' + doc["_id"]; | |
const file = await this.fileService.getFile(key); | |
return file; | |
} |
@BULMA-OO Why are you assigning any
to doc
?
No description provided.