fix(server): stream admin sort by stream size fixed
This commit is contained in:
@@ -96,7 +96,6 @@
|
||||
style="cursor: pointer; min-height: 33px; line-height: 33px"
|
||||
:class="`grey ${$vuetify.theme.dark ? 'darken-3' : 'lighten-3'} rounded-xl px-2`"
|
||||
>
|
||||
<v-icon small>mdi-call-received</v-icon>
|
||||
<user-avatar
|
||||
v-for="user in stream.collaborators.slice(0, 3)"
|
||||
v-show="$vuetify.breakpoint.smAndUp"
|
||||
|
||||
@@ -140,7 +140,7 @@ module.exports = {
|
||||
|
||||
async getStreams( { offset, limit, orderBy, visibility, searchQuery } ) {
|
||||
let query = knex
|
||||
.column( 'streams.*', knex.raw( 'sum(pg_column_size(objects.data)) as size' ) )
|
||||
.column( 'streams.*', knex.raw( 'coalesce(sum(pg_column_size(objects.data)),0) as size' ) )
|
||||
.select()
|
||||
.from( 'streams' )
|
||||
.leftJoin( 'objects', 'streams.id', 'objects.streamId' )
|
||||
|
||||
Reference in New Issue
Block a user