diff --git a/.eslintrc.json b/.eslintrc.json index e1fa319af..496f9e47d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,53 +1,44 @@ { - "env": { - "browser": true, - "commonjs": true, - "es2020": true - }, - "parserOptions": { - "ecmaVersion": 11 - }, - "ignorePatterns": [ - "modules/*/tests/*", - "node_modules/*", - "frontend/*" + "env": { + "browser": true, + "commonjs": true, + "es2020": true + }, + "parserOptions": { + "ecmaVersion": 11 + }, + "ignorePatterns": [ + "modules/*/tests/*", + "node_modules/*", + "frontend/*", + "*.graphql" + ], + "rules": { + "arrow-spacing": [ + 2, + { + "before": true, + "after": true + } ], - "rules": { - "arrow-spacing": [ - 2, - { - "before": true, - "after": true - } - ], - "array-bracket-spacing": [ - 2, - "always" - ], - "block-spacing": [ - 2, - "always" - ], - "camelcase": [ - 1, - { - "properties": "always" - } - ], - "space-in-parens": [ - 2, - "always" - ], - "keyword-spacing": 2, - "semi": "off", - "indent": [ - "error", - 2 - ], - "space-unary-ops": [ - 2, { - "words": true, - "nonwords": false - }] - } + "array-bracket-spacing": [2, "always"], + "block-spacing": [2, "always"], + "camelcase": [ + 1, + { + "properties": "always" + } + ], + "space-in-parens": [2, "always"], + "keyword-spacing": 2, + "semi": "off", + "indent": ["error", 2], + "space-unary-ops": [ + 2, + { + "words": true, + "nonwords": false + } + ] + } } diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..eece7edb1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.graphql \ No newline at end of file diff --git a/modules/core/graph/schemas/streams.graphql b/modules/core/graph/schemas/streams.graphql index b7ba2b201..875e3f53e 100644 --- a/modules/core/graph/schemas/streams.graphql +++ b/modules/core/graph/schemas/streams.graphql @@ -32,6 +32,8 @@ type StreamCollaborator { id: String! name: String! role: String! + company: String + avatar: String } type StreamCollection { diff --git a/modules/core/services/streams.js b/modules/core/services/streams.js index 12242c124..1132fd5eb 100644 --- a/modules/core/services/streams.js +++ b/modules/core/services/streams.js @@ -140,10 +140,10 @@ module.exports = { async getStreamUsers( { streamId } ) { let query = - Acl( ).columns( { role: 'stream_acl.role' }, 'id', 'name' ).select( ) + Acl( ).columns( { role: 'stream_acl.role' }, 'id', 'name', 'company', 'avatar' ).select( ) .where( { resourceId: streamId } ) .rightJoin( 'users', { 'users.id': 'stream_acl.userId' } ) - .select( 'stream_acl.role', 'name', 'id' ) + .select( 'stream_acl.role', 'name', 'id', 'company', 'avatar' ) .orderBy( 'stream_acl.role' ) return await query