fix(server): stream admin sort by stream size fixed

This commit is contained in:
Gergő Jedlicska
2021-11-29 15:40:33 +01:00
parent a94b17318a
commit 6b79bb1ccd
2 changed files with 1 additions and 2 deletions
@@ -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' )