Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
D_Team_Khuloud
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최동원
2020-05-27 04:19:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eacf2da71fd7ae8340b48d4dac8ee121a816fd94
eacf2da7
1 parent
9d6ac623
error fix
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
16 deletions
front-end/src/api/index.js
front-end/src/components/FileList.vue
front-end/src/api/index.js
View file @
eacf2da
...
...
@@ -15,11 +15,11 @@ function registerUser(userData) {
}
function
dropbox
(
userData
){
return
axios
.
get
(
`/api/folder/
${
userData
}
`
);
return
axios
.
get
(
`/api/folder/
show/
${
userData
}
`
);
}
function
makeFolder
(
folderData
){
return
axios
.
post
(
'/api/makefolder'
,
folderData
);
return
axios
.
post
(
'/api/
folder/
makefolder'
,
folderData
);
}
export
{
registerUser
,
loginUser
,
dropbox
,
makeFolder
};
\ No newline at end of file
...
...
front-end/src/components/FileList.vue
View file @
eacf2da
...
...
@@ -26,7 +26,7 @@
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title v-text="item"></v-list-item-title>
<v-list-item-title v-text="item
.folder_name
"></v-list-item-title>
</v-list-item-content>
<v-list-item-action>
...
...
@@ -90,7 +90,6 @@
</span>
</template>
</v-file-input>
<template>
<v-btn
bottom
color="blue"
...
...
@@ -102,7 +101,6 @@
>
<v-icon>mdi-plus</v-icon>
</v-btn>
</template>
<v-dialog
v-model="dialog"
width="800px"
...
...
@@ -114,7 +112,7 @@
<v-container>
<div>
<v-icon>mdi-folder</v-icon>
<v-text-field placeholder="name" id="foldername" type="text" v-mode
="foldername" @click="makeF"
></v-text-field>
<v-text-field placeholder="name" id="foldername" type="text" v-mode
l="foldername"
></v-text-field>
</div>
</v-container>
<v-card-actions>
...
...
@@ -126,7 +124,7 @@
>Cancel</v-btn>
<v-btn
text
@click="
dialog = false
"
@click="
makeF
"
>Create</v-btn>
</v-card-actions>
</v-card>
...
...
@@ -173,22 +171,14 @@ import { dropbox, makeFolder } from '../api/index';
folder_name : this.foldername
};
const response = await makeFolder(folderData);
if (reponse.status == 200){
try {
const res = await deropbox(folderData.user_id);
this.$store.commit('setFolder', response.data.folders);
this.$store.commit('setFile', response.data.files);
} catch (error) {
console.log("에러");
console.log(error.response.data);
}
}
console.log("폴더 생성 완료");
} catch (error) {
console.log("에러");
console.log(error.response.data);
} finally{
this.initFolderName();
this.dialog = false;
}
}
}
...
...
Please
register
or
login
to post a comment