karma -> karmaThresholds

This commit is contained in:
Wyatt Johnson
2018-05-24 13:57:15 -06:00
parent 8f51b07388
commit a046162f9c
5 changed files with 16 additions and 9 deletions
@@ -76,7 +76,13 @@ class UserDetail extends React.Component {
renderLoaded() {
const {
root,
root: { me, user, totalComments, rejectedComments, settings: { karma } },
root: {
me,
user,
totalComments,
rejectedComments,
settings: { karmaThresholds },
},
activeTab,
selectedCommentIds,
toggleSelect,
@@ -240,7 +246,7 @@ class UserDetail extends React.Component {
{user.reliable.commenterKarma}
</span>
</div>
<KarmaTooltip thresholds={karma.comment} />
<KarmaTooltip thresholds={karmaThresholds.comment} />
</li>
</ul>
</div>
@@ -228,7 +228,7 @@ export const withUserDetailQuery = withQuery(
${getSlotFragmentSpreads(slots, 'user')}
}
settings {
karma {
karmaThresholds {
comment {
reliable
unreliable
+2 -2
View File
@@ -323,7 +323,7 @@ export default {
commenter: {
$set: calculateReliability(
prev.user.reliable.commenterKarma - 1,
prev.settings.karma.comment
prev.settings.karmaThresholds.comment
),
},
commenterKarma: {
@@ -342,7 +342,7 @@ export default {
commenter: {
$set: calculateReliability(
prev.user.reliable.commenterKarma + 1,
prev.settings.karma.comment
prev.settings.karmaThresholds.comment
),
},
commenterKarma: {
+2 -2
View File
@@ -2,7 +2,7 @@ const { VIEW_PROTECTED_SETTINGS } = require('../../perms/constants');
const { decorateWithPermissionCheck } = require('./util');
const Settings = {
karma: (
karmaThresholds: (
settings,
args,
{ connectors: { services: { Karma: { THRESHOLDS } } } }
@@ -16,7 +16,7 @@ const PROTECTED_SETTINGS = {
autoCloseStream: [VIEW_PROTECTED_SETTINGS],
wordlist: [VIEW_PROTECTED_SETTINGS],
domains: [VIEW_PROTECTED_SETTINGS],
karma: [VIEW_PROTECTED_SETTINGS],
karmaThresholds: [VIEW_PROTECTED_SETTINGS],
};
// decorate the fields on the settings resolver with a permission check.
+3 -2
View File
@@ -897,8 +897,9 @@ type Settings {
# domains will return a given list of domains.
domains: Domains
# karma contains the currently set thresholds for triggering Trust beheviour.
karma: KarmaThresholds
# karmaThresholds contains the currently set thresholds for triggering Trust
# beheviour.
karmaThresholds: KarmaThresholds
}
################################################################################