aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/UploadList.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/UploadList.vue')
-rw-r--r--src/pages/UploadList.vue11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pages/UploadList.vue b/src/pages/UploadList.vue
index 733206f..423f381 100644
--- a/src/pages/UploadList.vue
+++ b/src/pages/UploadList.vue
@@ -17,16 +17,16 @@
:visible-columns="visibleColumns"
@refresh="refresh">
<q-td slot='body-cell-title' slot-scope="props" :props='props'>
- <router-link :to="{name: 'upload-detail', params: {uploadId: props.row._id}}">{{ props.value }}</router-link>
+ <router-link :to="{name: 'upload-detail', params: {uploadId: props.row.id}}">{{ props.value }}</router-link>
</q-td>
<q-td slot='body-cell-action' slot-scope="props" :props='props'>
<q-btn color="primary"
- v-if="$route.params.uploadId !== props.row._id"
+ v-if="$route.params.uploadId !== props.row.id"
small
outline
icon="fa-info-circle"
label="Show"
- @click="$router.push({name: 'upload-detail', params: {uploadId: props.row._id}})" />
+ @click="$router.push({name: 'upload-detail', params: {uploadId: props.row.id}})" />
</q-td>
<q-td slot='body-cell-voting' slot-scope="props" :props='props'>
{{ props.value.sum }} <i class="fa" :class="{'fa-caret-up text-positive': props.value.sum > 0, 'fa-caret-down text-negative': props.value.sum < 0, 'fa-sort text-dark': props.value.sum === 0}"></i>
@@ -82,7 +82,7 @@
align: 'left',
format: el => typeof el === 'string' && el.length > 50 ? el.slice(0, 50) + '...' : el,
},
- {name: 'author', label: 'Author', field: row => row.author.username, align: 'left'},
+ {name: 'author', label: 'Author', field: row => row.author.name, align: 'left'},
{name: 'voting', label: 'Voting', field: 'voting', align: 'left'},
{
name: 'updatedAt',
@@ -99,6 +99,7 @@
refresh (done) {
let that = this
this.$http.get('/uploads').then((response) => {
+ console.log(response.data.uploads)
that.response = response
that.uploads = response.data.uploads
if (done) {
@@ -118,7 +119,7 @@
outline: true,
},
cancel: 'Cancel',
- }).then(() => that.$http.delete(`/uploads/${upload._id}`).then(response => that.refresh()))
+ }).then(() => that.$http.delete(`/uploads/${upload.id}`).then(response => that.refresh()))
},
},
}