Skip to content

Commit

Permalink
Fix: 파일 이동시 다른 파일까지 같이 이동되는 버그
Browse files Browse the repository at this point in the history
  • Loading branch information
leehj050211 committed Apr 7, 2022
1 parent 0bac1cf commit 87cc01b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bsm-cloud",
"version": "1.0.0",
"version": "1.1.0",
"description": "",
"author": "",
"private": true,
Expand Down
7 changes: 4 additions & 3 deletions src/drive/repository/file.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ export class FileRepository extends Repository<File> {
fileDto: FileDto,
newFolderId: string
):Promise<void> {
const {driveId, folderId} = fileDto;
const {fileId, driveId, folderId} = fileDto;
try {
this.update({
driveId: new Buffer(driveId, 'hex'),
folderId: folderId === 'root'? null: new Buffer(folderId, 'hex')
fileId: new Buffer(fileId, 'hex'),
folderId: folderId === 'root'? null: new Buffer(folderId, 'hex'),
driveId: new Buffer(driveId, 'hex')
}, {
folderId: newFolderId === 'root'? null: new Buffer(newFolderId, 'hex')
})
Expand Down

0 comments on commit 87cc01b

Please sign in to comment.