fix: admin contribute list + source permission

This commit is contained in:
NGPixel 2020-01-18 15:18:41 -05:00
parent c04eea9c2b
commit 91e897ccd9
6 changed files with 1219 additions and 549 deletions

View File

@ -64,16 +64,16 @@
input(type='image', src='/img/donate_paypal.png', border='0', name='submit', title='PayPal - The safer, easier way to pay online!', alt='Donate with PayPal button') input(type='image', src='/img/donate_paypal.png', border='0', name='submit', title='PayPal - The safer, easier way to pay online!', alt='Donate with PayPal button')
img(alt='', border='0', src='https://www.paypal.com/en_CA/i/scr/pixel.gif', width='1', height='1') img(alt='', border='0', src='https://www.paypal.com/en_CA/i/scr/pixel.gif', width='1', height='1')
v-tab-item(:transition='false', :reverse-transition='false') v-tab-item(:transition='false', :reverse-transition='false')
.body-1.pa-3 {{ $t('admin:contribute.ethereum') }} .body-2.pa-3 {{ $t('admin:contribute.ethereum') }}
.ml-3 .ml-3
.admin-contribute-ethaddress .admin-contribute-ethaddress
strong Ethereum Address strong Ethereum Address
span 0xE1d55C19aE86f6Bcbfb17e7f06aCe96BdBb22Cb5 span 0xE1d55C19aE86f6Bcbfb17e7f06aCe96BdBb22Cb5
div: img(src='/img/donate_eth_qr.png') div: img(src='/img/donate_eth_qr.png')
v-tab-item(:transition='false', :reverse-transition='false') v-tab-item(:transition='false', :reverse-transition='false')
.body-1.pa-3 {{ $t('admin:contribute.tshirts') }} .body-2.pa-3 {{ $t('admin:contribute.tshirts') }}
v-card-actions.ml-2 v-card-actions.ml-2
v-btn(outlined, :color='darkMode ? `blue lighten-1` : `primary`', href='https://wikijs.threadless.com', large) v-btn(outlined, :color='$vuetify.theme.dark ? `blue lighten-1` : `primary`', href='https://wikijs.threadless.com', large)
v-icon(left) mdi-tshirt-crew v-icon(left) mdi-tshirt-crew
span {{ $t('admin:contribute.shop') }} span {{ $t('admin:contribute.shop') }}
v-divider.mt-3 v-divider.mt-3
@ -93,48 +93,27 @@
li {{ $t('admin:contribute.talkToFriends') }} li {{ $t('admin:contribute.talkToFriends') }}
i18next(path='admin:contribute.followUsOnTwitter', tag='li') i18next(path='admin:contribute.followUsOnTwitter', tag='li')
a(href='https://twitter.com/requarks', target='_blank') Twitter a(href='https://twitter.com/requarks', target='_blank') Twitter
v-toolbar(color='teal', dense, dark) v-toolbar(color='indigo', dense, dark)
.subtitle-1 Sponsors .subtitle-1 Sponsors & Backers
v-spacer v-container.pa-5.grey(fluid, :class='$vuetify.theme.dark ? `darken-3` : `lighten-4`')
v-btn(outlined, small, href='https://opencollective.com/wikijs/order/1273') Become a Sponsor v-progress-circular(indeterminate, color='indigo', size='24', width='2', v-if='backers.length < 1')
v-list(two-line) v-row(dense)
template(v-for='(sponsor, idx) in sponsors') v-col(cols='12', lg='6', xl='4', v-for='(backer, idx) in backers', :key='backer.id')
v-list-item(:key='sponsor.id') v-card.grey(flat, :class='$vuetify.theme.dark ? `darken-4` : `lighten-2`')
v-list-item-avatar v-list-item
img(v-if='sponsor.image', :src='sponsor.image') v-list-item-avatar
v-avatar(v-else, color='teal', size='40') img(v-if='backer.avatar', :src='backer.avatar')
span.white--text.subtitle-1 {{sponsor.name[0].toUpperCase()}} v-avatar(v-else, color='blue-grey', size='40')
v-list-item-content span.white--text.subtitle-1 {{backer.name[0].toUpperCase()}}
v-list-item-title {{sponsor.name}} v-list-item-content
v-list-item-subtitle {{sponsor.description}} v-list-item-title {{backer.name}}
v-list-item-action(v-if='sponsor.twitter') v-list-item-subtitle: .caption Since {{backer.joined | moment('MMMM DD, YYYY')}} on {{backer.source}}
v-btn(icon, :href='sponsor.twitter', target='_blank') v-list-item-action(v-if='backer.twitter')
v-icon mdi-twitter v-btn(icon, :href='backer.twitter', target='_blank')
v-list-item-action(v-if='sponsor.website') v-icon(color='grey') mdi-twitter
v-btn(icon, :href='sponsor.website', target='_blank') v-list-item-action(v-if='backer.website')
v-icon(color='grey') mdi-earth v-btn(icon, :href='backer.website', target='_blank')
v-divider(v-if='idx < sponsors.length - 1') v-icon(color='grey') mdi-earth
v-toolbar(color='blue-grey', dense, dark)
.subtitle-1 Backers
v-spacer
v-btn(outlined, small, href='https://opencollective.com/wikijs/order/1272') Become a Backer
v-list(two-line, dense)
template(v-for='(backer, idx) in backers')
v-list-item(:key='backer.id')
v-list-item-avatar
img(v-if='backer.image', :src='backer.image')
v-avatar(v-else, color='blue-grey', size='40')
span.white--text.subtitle-1 {{backer.name[0].toUpperCase()}}
v-list-item-content
v-list-item-title {{backer.name}}
v-list-item-subtitle {{backer.description}}
v-list-item-action(v-if='backer.twitter')
v-btn(icon, :href='backer.twitter', target='_blank')
v-icon mdi-twitter
v-list-item-action(v-if='backer.website')
v-btn(icon, :href='backer.website', target='_blank')
v-icon(color='grey') mdi-earth
v-divider(v-if='idx < backers.length - 1')
v-toolbar(color='primary', dense, dark) v-toolbar(color='primary', dense, dark)
.subtitle-1 Special Thanks .subtitle-1 Special Thanks
v-list(two-line) v-list(two-line)
@ -211,29 +190,31 @@
</template> </template>
<script> <script>
import _ from 'lodash' import gql from 'graphql-tag'
import { get } from 'vuex-pathify'
import groupsQuery from 'gql/admin/contribute/contribute-query-contributors.gql'
export default { export default {
data() { data() {
return { return {
contributors: [] backers: []
}
},
computed: {
darkMode: get('site/dark'),
sponsors() {
return _.filter(this.contributors, ['tier', 'sponsors'])
},
backers() {
return _.reject(this.contributors, ['tier', 'sponsors'])
} }
}, },
apollo: { apollo: {
contributors: { backers: {
query: groupsQuery, query: gql`
{
contribute {
contributors {
id
source
name
joined
website
twitter
avatar
}
}
}
`,
fetchPolicy: 'network-only', fetchPolicy: 'network-only',
update: (data) => data.contribute.contributors, update: (data) => data.contribute.contributors,
watchLoading (isLoading) { watchLoading (isLoading) {

View File

@ -36,7 +36,7 @@
}, },
"dependencies": { "dependencies": {
"@aoberoi/passport-slack": "1.0.5", "@aoberoi/passport-slack": "1.0.5",
"@azure/storage-blob": "12.0.1", "@azure/storage-blob": "12.0.2",
"@bugsnag/js": "6.5.0", "@bugsnag/js": "6.5.0",
"@exlinc/keycloak-passport": "1.0.2", "@exlinc/keycloak-passport": "1.0.2",
"@root/csr": "0.8.1", "@root/csr": "0.8.1",
@ -45,10 +45,10 @@
"acme": "3.0.3", "acme": "3.0.3",
"algoliasearch": "3.35.1", "algoliasearch": "3.35.1",
"apollo-fetch": "0.7.0", "apollo-fetch": "0.7.0",
"apollo-server": "2.9.15", "apollo-server": "2.9.16",
"apollo-server-express": "2.9.15", "apollo-server-express": "2.9.16",
"auto-load": "3.0.4", "auto-load": "3.0.4",
"aws-sdk": "2.596.0", "aws-sdk": "2.606.0",
"azure-search-client": "3.1.5", "azure-search-client": "3.1.5",
"bcryptjs-then": "1.0.1", "bcryptjs-then": "1.0.1",
"bluebird": "3.7.2", "bluebird": "3.7.2",
@ -64,8 +64,8 @@
"cors": "2.8.5", "cors": "2.8.5",
"custom-error-instance": "2.1.1", "custom-error-instance": "2.1.1",
"dependency-graph": "0.8.1", "dependency-graph": "0.8.1",
"diff": "4.0.1", "diff": "4.0.2",
"diff2html": "2.12.1", "diff2html": "3.0.0-master.128204d",
"dotize": "0.3.0", "dotize": "0.3.0",
"elasticsearch6": "npm:@elastic/elasticsearch@6", "elasticsearch6": "npm:@elastic/elasticsearch@6",
"elasticsearch7": "npm:@elastic/elasticsearch@7", "elasticsearch7": "npm:@elastic/elasticsearch@7",
@ -73,7 +73,7 @@
"express": "4.17.1", "express": "4.17.1",
"express-brute": "1.0.1", "express-brute": "1.0.1",
"express-session": "1.17.0", "express-session": "1.17.0",
"file-type": "12.4.2", "file-type": "13.1.0",
"filesize": "6.0.1", "filesize": "6.0.1",
"fs-extra": "8.1.0", "fs-extra": "8.1.0",
"getos": "3.1.1", "getos": "3.1.1",
@ -84,7 +84,7 @@
"graphql-tools": "4.0.6", "graphql-tools": "4.0.6",
"he": "1.2.0", "he": "1.2.0",
"highlight.js": "9.17.1", "highlight.js": "9.17.1",
"i18next": "19.0.2", "i18next": "19.0.3",
"i18next-express-middleware": "1.9.1", "i18next-express-middleware": "1.9.1",
"i18next-node-fs-backend": "2.1.3", "i18next-node-fs-backend": "2.1.3",
"image-size": "0.8.3", "image-size": "0.8.3",
@ -94,7 +94,7 @@
"jsonwebtoken": "8.5.1", "jsonwebtoken": "8.5.1",
"katex": "0.11.1", "katex": "0.11.1",
"klaw": "3.0.0", "klaw": "3.0.0",
"knex": "0.20.6", "knex": "0.20.8",
"lodash": "4.17.15", "lodash": "4.17.15",
"markdown-it": "10.0.0", "markdown-it": "10.0.0",
"markdown-it-abbr": "1.0.4", "markdown-it-abbr": "1.0.4",
@ -110,14 +110,14 @@
"markdown-it-sup": "1.0.0", "markdown-it-sup": "1.0.0",
"markdown-it-task-lists": "2.1.1", "markdown-it-task-lists": "2.1.1",
"mathjax-node": "2.1.1", "mathjax-node": "2.1.1",
"mime-types": "2.1.25", "mime-types": "2.1.26",
"moment": "2.24.0", "moment": "2.24.0",
"moment-timezone": "0.5.27", "moment-timezone": "0.5.27",
"mongodb": "3.4.1", "mongodb": "3.5.1",
"mssql": "6.0.1", "mssql": "6.0.1",
"multer": "1.4.2", "multer": "1.4.2",
"mysql2": "2.1.0", "mysql2": "2.1.0",
"nanoid": "2.1.8", "nanoid": "2.1.9",
"node-2fa": "1.1.2", "node-2fa": "1.1.2",
"node-cache": "5.1.0", "node-cache": "5.1.0",
"nodemailer": "6.4.2", "nodemailer": "6.4.2",
@ -142,9 +142,9 @@
"passport-saml": "1.2.0", "passport-saml": "1.2.0",
"passport-twitch": "1.0.3", "passport-twitch": "1.0.3",
"pem-jwk": "2.0.0", "pem-jwk": "2.0.0",
"pg": "7.17.0", "pg": "7.17.1",
"pg-hstore": "2.3.3", "pg-hstore": "2.3.3",
"pg-query-stream": "2.1.2", "pg-query-stream": "3.0.0",
"pg-tsquery": "8.1.0", "pg-tsquery": "8.1.0",
"pug": "2.0.4", "pug": "2.0.4",
"punycode": "2.1.1", "punycode": "2.1.1",
@ -155,7 +155,7 @@
"request-promise": "4.2.5", "request-promise": "4.2.5",
"safe-regex": "2.1.1", "safe-regex": "2.1.1",
"sanitize-filename": "1.6.3", "sanitize-filename": "1.6.3",
"scim-query-filter-parser": "2.0.2", "scim-query-filter-parser": "2.0.4",
"semver": "7.1.1", "semver": "7.1.1",
"serve-favicon": "2.5.0", "serve-favicon": "2.5.0",
"simple-git": "1.129.0", "simple-git": "1.129.0",
@ -168,26 +168,26 @@
"tar-fs": "2.0.0", "tar-fs": "2.0.0",
"twemoji": "12.1.4", "twemoji": "12.1.4",
"uslug": "1.0.4", "uslug": "1.0.4",
"uuid": "3.3.3", "uuid": "3.4.0",
"validate.js": "0.13.1", "validate.js": "0.13.1",
"winston": "3.2.1", "winston": "3.2.1",
"xss": "1.0.6", "xss": "1.0.6",
"yargs": "15.1.0" "yargs": "15.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.7.7", "@babel/cli": "^7.8.3",
"@babel/core": "^7.7.7", "@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.7.4", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.7.4", "@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-export-namespace-from": "^7.7.4", "@babel/plugin-proposal-export-namespace-from": "^7.8.3",
"@babel/plugin-proposal-function-sent": "^7.7.4", "@babel/plugin-proposal-function-sent": "^7.8.3",
"@babel/plugin-proposal-json-strings": "^7.7.4", "@babel/plugin-proposal-json-strings": "^7.8.3",
"@babel/plugin-proposal-numeric-separator": "^7.7.4", "@babel/plugin-proposal-numeric-separator": "^7.8.3",
"@babel/plugin-proposal-throw-expressions": "^7.7.4", "@babel/plugin-proposal-throw-expressions": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.7.4", "@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.7.4", "@babel/plugin-syntax-import-meta": "^7.8.3",
"@babel/polyfill": "^7.7.0", "@babel/polyfill": "^7.8.3",
"@babel/preset-env": "^7.7.7", "@babel/preset-env": "^7.8.3",
"@mdi/font": "4.7.95", "@mdi/font": "4.7.95",
"@panter/vue-i18next": "0.15.1", "@panter/vue-i18next": "0.15.1",
"@requarks/ckeditor5": "12.4.0-wiki.14", "@requarks/ckeditor5": "12.4.0-wiki.14",
@ -203,13 +203,13 @@
"apollo-link-persisted-queries": "0.2.2", "apollo-link-persisted-queries": "0.2.2",
"apollo-link-ws": "1.0.19", "apollo-link-ws": "1.0.19",
"apollo-utilities": "1.3.3", "apollo-utilities": "1.3.3",
"autoprefixer": "9.7.3", "autoprefixer": "9.7.4",
"babel-eslint": "10.0.3", "babel-eslint": "10.0.3",
"babel-jest": "24.9.0", "babel-jest": "24.9.0",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"babel-plugin-graphql-tag": "2.5.0", "babel-plugin-graphql-tag": "2.5.0",
"babel-plugin-lodash": "3.3.4", "babel-plugin-lodash": "3.3.4",
"babel-plugin-prismjs": "1.1.1", "babel-plugin-prismjs": "2.0.0",
"babel-plugin-transform-imports": "2.0.0", "babel-plugin-transform-imports": "2.0.0",
"cache-loader": "4.1.0", "cache-loader": "4.1.0",
"chart.js": "2.9.3", "chart.js": "2.9.3",
@ -217,8 +217,8 @@
"clipboard": "2.0.4", "clipboard": "2.0.4",
"codemirror": "5.50.2", "codemirror": "5.50.2",
"copy-webpack-plugin": "5.1.1", "copy-webpack-plugin": "5.1.1",
"core-js": "3.6.1", "core-js": "3.6.4",
"css-loader": "3.4.0", "css-loader": "3.4.2",
"cssnano": "4.1.10", "cssnano": "4.1.10",
"d3": "5.15.0", "d3": "5.15.0",
"duplicate-package-checker-webpack-plugin": "3.0.0", "duplicate-package-checker-webpack-plugin": "3.0.0",
@ -226,14 +226,14 @@
"eslint": "6.8.0", "eslint": "6.8.0",
"eslint-config-requarks": "1.0.7", "eslint-config-requarks": "1.0.7",
"eslint-config-standard": "14.1.0", "eslint-config-standard": "14.1.0",
"eslint-plugin-import": "2.19.1", "eslint-plugin-import": "2.20.0",
"eslint-plugin-node": "11.0.0", "eslint-plugin-node": "11.0.0",
"eslint-plugin-promise": "4.2.1", "eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.1", "eslint-plugin-standard": "4.0.1",
"eslint-plugin-vue": "6.1.2", "eslint-plugin-vue": "6.1.2",
"fibers": "4.0.2", "fibers": "4.0.2",
"file-loader": "5.0.2", "file-loader": "5.0.2",
"filepond": "4.9.3", "filepond": "4.9.4",
"filepond-plugin-file-validate-type": "1.2.4", "filepond-plugin-file-validate-type": "1.2.4",
"filesize.js": "2.0.0", "filesize.js": "2.0.0",
"graphql-persisted-document-loader": "2.0.0", "graphql-persisted-document-loader": "2.0.0",
@ -241,7 +241,7 @@
"hammerjs": "2.0.8", "hammerjs": "2.0.8",
"html-webpack-plugin": "4.0.0-beta.8", "html-webpack-plugin": "4.0.0-beta.8",
"html-webpack-pug-plugin": "2.0.0", "html-webpack-pug-plugin": "2.0.0",
"i18next-chained-backend": "2.0.0", "i18next-chained-backend": "2.0.1",
"i18next-localstorage-backend": "3.0.0", "i18next-localstorage-backend": "3.0.0",
"i18next-xhr-backend": "3.2.2", "i18next-xhr-backend": "3.2.2",
"ignore-loader": "0.1.2", "ignore-loader": "0.1.2",
@ -258,19 +258,19 @@
"postcss-loader": "3.0.0", "postcss-loader": "3.0.0",
"postcss-preset-env": "6.7.0", "postcss-preset-env": "6.7.0",
"postcss-selector-parser": "6.0.2", "postcss-selector-parser": "6.0.2",
"prismjs": "1.17.1", "prismjs": "1.19.0",
"pug-lint": "2.6.0", "pug-lint": "2.6.0",
"pug-loader": "2.4.0", "pug-loader": "2.4.0",
"pug-plain-loader": "1.0.0", "pug-plain-loader": "1.0.0",
"raw-loader": "4.0.0", "raw-loader": "4.0.0",
"resolve-url-loader": "3.1.1", "resolve-url-loader": "3.1.1",
"sass": "1.24.0", "sass": "1.25.0",
"sass-loader": "8.0.0", "sass-loader": "8.0.2",
"sass-resources-loader": "2.0.1", "sass-resources-loader": "2.0.1",
"script-ext-html-webpack-plugin": "2.1.4", "script-ext-html-webpack-plugin": "2.1.4",
"simple-progress-webpack-plugin": "1.1.2", "simple-progress-webpack-plugin": "1.1.2",
"style-loader": "1.1.2", "style-loader": "1.1.3",
"terser": "4.5.0", "terser": "4.6.3",
"twemoji-awesome": "1.0.6", "twemoji-awesome": "1.0.6",
"url-loader": "3.0.0", "url-loader": "3.0.0",
"velocity-animate": "1.5.2", "velocity-animate": "1.5.2",
@ -279,17 +279,17 @@
"vue-apollo": "3.0.2", "vue-apollo": "3.0.2",
"vue-chartjs": "3.5.0", "vue-chartjs": "3.5.0",
"vue-clipboards": "1.3.0", "vue-clipboards": "1.3.0",
"vue-filepond": "6.0.0", "vue-filepond": "6.0.2",
"vue-hot-reload-api": "2.3.4", "vue-hot-reload-api": "2.3.4",
"vue-loader": "15.8.3", "vue-loader": "15.8.3",
"vue-moment": "4.1.0", "vue-moment": "4.1.0",
"vue-router": "3.1.3", "vue-router": "3.1.5",
"vue-status-indicator": "1.2.1", "vue-status-indicator": "1.2.1",
"vue-template-compiler": "2.6.11", "vue-template-compiler": "2.6.11",
"vue2-animate": "2.1.3", "vue2-animate": "2.1.3",
"vuedraggable": "2.23.2", "vuedraggable": "2.23.2",
"vuescroll": "4.14.4", "vuescroll": "4.14.4",
"vuetify": "2.2.0", "vuetify": "2.2.4",
"vuetify-loader": "1.4.3", "vuetify-loader": "1.4.3",
"vuex": "3.1.2", "vuex": "3.1.2",
"vuex-pathify": "1.4.1", "vuex-pathify": "1.4.1",
@ -300,7 +300,7 @@
"webpack-dev-middleware": "3.7.2", "webpack-dev-middleware": "3.7.2",
"webpack-hot-middleware": "2.25.0", "webpack-hot-middleware": "2.25.0",
"webpack-merge": "4.2.2", "webpack-merge": "4.2.2",
"webpack-subresource-integrity": "1.3.4", "webpack-subresource-integrity": "1.4.0",
"webpackbar": "4.0.0", "webpackbar": "4.0.0",
"whatwg-fetch": "3.0.0", "whatwg-fetch": "3.0.0",
"write-file-webpack-plugin": "4.5.1", "write-file-webpack-plugin": "4.5.1",

View File

@ -109,7 +109,7 @@ router.get(['/h', '/h/*'], async (req, res, next) => {
_.set(res, 'locals.siteConfig.lang', pageArgs.locale) _.set(res, 'locals.siteConfig.lang', pageArgs.locale)
if (!WIKI.auth.checkAccess(req.user, ['read:pages'], pageArgs)) { if (!WIKI.auth.checkAccess(req.user, ['read:history'], pageArgs)) {
_.set(res.locals, 'pageMeta.title', 'Unauthorized') _.set(res.locals, 'pageMeta.title', 'Unauthorized')
return res.render('unauthorized', { action: 'history' }) return res.render('unauthorized', { action: 'history' })
} }
@ -182,7 +182,7 @@ router.get(['/s', '/s/*'], async (req, res, next) => {
_.set(res, 'locals.siteConfig.lang', pageArgs.locale) _.set(res, 'locals.siteConfig.lang', pageArgs.locale)
if (!WIKI.auth.checkAccess(req.user, ['read:pages'], pageArgs)) { if (!WIKI.auth.checkAccess(req.user, ['read:source'], pageArgs)) {
return res.render('unauthorized', { action: 'source' }) return res.render('unauthorized', { action: 'source' })
} }

View File

@ -1,31 +1,28 @@
const request = require('request-promise') const request = require('request-promise')
const _ = require('lodash') const _ = require('lodash')
/* global WIKI */
module.exports = { module.exports = {
Query: { Query: {
async contribute() { return {} } async contribute() { return {} }
}, },
ContributeQuery: { ContributeQuery: {
async contributors(obj, args, context, info) { async contributors(obj, args, context, info) {
const resp = await request({ try {
uri: 'https://opencollective.com/wikijs/members/all.json', const resp = await request({
json: true method: 'POST',
}) uri: 'https://graph.requarks.io',
return _.filter(resp, c => { json: true,
return c.role === 'BACKER' && c.totalAmountDonated > 0 body: {
}).map(c => ({ query: '{\n sponsors {\n list(kind: BACKER) {\n id\n source\n name\n joined\n website\n twitter\n avatar\n }\n }\n}\n',
company: _.get(c, 'company', '') || '', variables: {}
currency: _.get(c, 'currency', 'USD') || 'USD', }
description: _.get(c, 'description', '') || '', })
id: _.get(c, 'MemberId', 0), return _.get(resp, 'data.sponsors.list', [])
image: _.get(c, 'image', '') || '', } catch (err) {
name: _.get(c, 'name', 'Anonymous') || '', WIKI.logger.warn(err)
profile: _.get(c, 'profile', ''), }
tier: _.toLower(_.get(c, 'tier', 'backers')),
totalDonated: Math.ceil(_.get(c, 'totalAmountDonated', 0)),
twitter: _.get(c, 'twitter', '') || '',
website: _.get(c, 'website', '') || ''
}))
} }
} }
} }

View File

@ -19,15 +19,11 @@ type ContributeQuery {
# ----------------------------------------------- # -----------------------------------------------
type ContributeContributor { type ContributeContributor {
company: String! id: String!
currency: String! source: String!
description: String!
id: Int!
image: String!
name: String! name: String!
profile: String! joined: Date!
tier: String! website: String
totalDonated: Int! twitter: String
twitter: String! avatar: String
website: String!
} }

1520
yarn.lock

File diff suppressed because it is too large Load Diff