Showing
2 changed files
with
8 additions
and
18 deletions
... | @@ -15,11 +15,11 @@ function registerUser(userData) { | ... | @@ -15,11 +15,11 @@ function registerUser(userData) { |
15 | } | 15 | } |
16 | 16 | ||
17 | function dropbox(userData){ | 17 | function dropbox(userData){ |
18 | - return axios.get(`/api/folder/${userData}`); | 18 | + return axios.get(`/api/folder/show/${userData}`); |
19 | } | 19 | } |
20 | 20 | ||
21 | function makeFolder(folderData){ | 21 | function makeFolder(folderData){ |
22 | - return axios.post('/api/makefolder', folderData); | 22 | + return axios.post('/api/folder/makefolder', folderData); |
23 | } | 23 | } |
24 | 24 | ||
25 | export { registerUser, loginUser, dropbox, makeFolder }; | 25 | export { registerUser, loginUser, dropbox, makeFolder }; |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
26 | </v-list-item-avatar> | 26 | </v-list-item-avatar> |
27 | 27 | ||
28 | <v-list-item-content> | 28 | <v-list-item-content> |
29 | - <v-list-item-title v-text="item"></v-list-item-title> | 29 | + <v-list-item-title v-text="item.folder_name"></v-list-item-title> |
30 | </v-list-item-content> | 30 | </v-list-item-content> |
31 | 31 | ||
32 | <v-list-item-action> | 32 | <v-list-item-action> |
... | @@ -89,8 +89,7 @@ | ... | @@ -89,8 +89,7 @@ |
89 | +{{ files.length - 2 }} File(s) | 89 | +{{ files.length - 2 }} File(s) |
90 | </span> | 90 | </span> |
91 | </template> | 91 | </template> |
92 | - </v-file-input> | 92 | + </v-file-input> |
93 | - <template> | ||
94 | <v-btn | 93 | <v-btn |
95 | bottom | 94 | bottom |
96 | color="blue" | 95 | color="blue" |
... | @@ -102,7 +101,6 @@ | ... | @@ -102,7 +101,6 @@ |
102 | > | 101 | > |
103 | <v-icon>mdi-plus</v-icon> | 102 | <v-icon>mdi-plus</v-icon> |
104 | </v-btn> | 103 | </v-btn> |
105 | - </template> | ||
106 | <v-dialog | 104 | <v-dialog |
107 | v-model="dialog" | 105 | v-model="dialog" |
108 | width="800px" | 106 | width="800px" |
... | @@ -114,7 +112,7 @@ | ... | @@ -114,7 +112,7 @@ |
114 | <v-container> | 112 | <v-container> |
115 | <div> | 113 | <div> |
116 | <v-icon>mdi-folder</v-icon> | 114 | <v-icon>mdi-folder</v-icon> |
117 | - <v-text-field placeholder="name" id="foldername" type="text" v-mode="foldername" @click="makeF"></v-text-field> | 115 | + <v-text-field placeholder="name" id="foldername" type="text" v-model="foldername" ></v-text-field> |
118 | </div> | 116 | </div> |
119 | </v-container> | 117 | </v-container> |
120 | <v-card-actions> | 118 | <v-card-actions> |
... | @@ -126,7 +124,7 @@ | ... | @@ -126,7 +124,7 @@ |
126 | >Cancel</v-btn> | 124 | >Cancel</v-btn> |
127 | <v-btn | 125 | <v-btn |
128 | text | 126 | text |
129 | - @click="dialog = false" | 127 | + @click="makeF" |
130 | >Create</v-btn> | 128 | >Create</v-btn> |
131 | </v-card-actions> | 129 | </v-card-actions> |
132 | </v-card> | 130 | </v-card> |
... | @@ -173,22 +171,14 @@ import { dropbox, makeFolder } from '../api/index'; | ... | @@ -173,22 +171,14 @@ import { dropbox, makeFolder } from '../api/index'; |
173 | folder_name : this.foldername | 171 | folder_name : this.foldername |
174 | }; | 172 | }; |
175 | const response = await makeFolder(folderData); | 173 | const response = await makeFolder(folderData); |
176 | - if (reponse.status == 200){ | 174 | + this.$store.commit('setFolder', response.data.folders); |
177 | - try { | ||
178 | - const res = await deropbox(folderData.user_id); | ||
179 | - this.$store.commit('setFolder', response.data.folders); | ||
180 | - this.$store.commit('setFile', response.data.files); | ||
181 | - } catch (error) { | ||
182 | - console.log("에러"); | ||
183 | - console.log(error.response.data); | ||
184 | - } | ||
185 | - } | ||
186 | console.log("폴더 생성 완료"); | 175 | console.log("폴더 생성 완료"); |
187 | } catch (error) { | 176 | } catch (error) { |
188 | console.log("에러"); | 177 | console.log("에러"); |
189 | console.log(error.response.data); | 178 | console.log(error.response.data); |
190 | } finally{ | 179 | } finally{ |
191 | this.initFolderName(); | 180 | this.initFolderName(); |
181 | + this.dialog = false; | ||
192 | } | 182 | } |
193 | } | 183 | } |
194 | } | 184 | } | ... | ... |
-
Please register or login to post a comment