increase bounty limits
This commit is contained in:
parent
6170853d72
commit
385b07a506
|
@ -17,6 +17,8 @@ export const UPLOAD_TYPES_ALLOW = [
|
||||||
'image/jpeg',
|
'image/jpeg',
|
||||||
'image/webp'
|
'image/webp'
|
||||||
]
|
]
|
||||||
|
export const BOUNTY_MIN = 1000
|
||||||
|
export const BOUNTY_MAX = 10000000
|
||||||
export const POST_TYPES = ['LINK', 'DISCUSSION', 'BOUNTY', 'POLL']
|
export const POST_TYPES = ['LINK', 'DISCUSSION', 'BOUNTY', 'POLL']
|
||||||
export const TERRITORY_BILLING_TYPES = ['MONTHLY', 'YEARLY', 'ONCE']
|
export const TERRITORY_BILLING_TYPES = ['MONTHLY', 'YEARLY', 'ONCE']
|
||||||
export const TERRITORY_GRACE_DAYS = 5
|
export const TERRITORY_GRACE_DAYS = 5
|
||||||
|
|
|
@ -2,11 +2,12 @@ import { string, ValidationError, number, object, array, addMethod, boolean } fr
|
||||||
import {
|
import {
|
||||||
BOOST_MIN, MAX_POLL_CHOICE_LENGTH, MAX_TITLE_LENGTH, MAX_POLL_NUM_CHOICES,
|
BOOST_MIN, MAX_POLL_CHOICE_LENGTH, MAX_TITLE_LENGTH, MAX_POLL_NUM_CHOICES,
|
||||||
MIN_POLL_NUM_CHOICES, MAX_FORWARDS, BOOST_MULT, MAX_TERRITORY_DESC_LENGTH, POST_TYPES,
|
MIN_POLL_NUM_CHOICES, MAX_FORWARDS, BOOST_MULT, MAX_TERRITORY_DESC_LENGTH, POST_TYPES,
|
||||||
TERRITORY_BILLING_TYPES, MAX_COMMENT_TEXT_LENGTH, MAX_POST_TEXT_LENGTH, MIN_TITLE_LENGTH
|
TERRITORY_BILLING_TYPES, MAX_COMMENT_TEXT_LENGTH, MAX_POST_TEXT_LENGTH, MIN_TITLE_LENGTH, BOUNTY_MIN, BOUNTY_MAX
|
||||||
} from './constants'
|
} from './constants'
|
||||||
import { URL_REGEXP, WS_REGEXP } from './url'
|
import { URL_REGEXP, WS_REGEXP } from './url'
|
||||||
import { SUPPORTED_CURRENCIES } from './currency'
|
import { SUPPORTED_CURRENCIES } from './currency'
|
||||||
import { NOSTR_MAX_RELAY_NUM, NOSTR_PUBKEY_BECH32, NOSTR_PUBKEY_HEX } from './nostr'
|
import { NOSTR_MAX_RELAY_NUM, NOSTR_PUBKEY_BECH32, NOSTR_PUBKEY_HEX } from './nostr'
|
||||||
|
import { numWithUnits } from './format'
|
||||||
import * as usersFragments from '../fragments/users'
|
import * as usersFragments from '../fragments/users'
|
||||||
import * as subsFragments from '../fragments/subs'
|
import * as subsFragments from '../fragments/subs'
|
||||||
const { SUB } = subsFragments
|
const { SUB } = subsFragments
|
||||||
|
@ -201,8 +202,8 @@ export function bountySchema (args) {
|
||||||
title: titleValidator,
|
title: titleValidator,
|
||||||
text: textValidator(MAX_POST_TEXT_LENGTH),
|
text: textValidator(MAX_POST_TEXT_LENGTH),
|
||||||
bounty: intValidator
|
bounty: intValidator
|
||||||
.min(1000, 'must be at least 1000')
|
.min(BOUNTY_MIN, `must be at least ${numWithUnits(BOUNTY_MIN)}`)
|
||||||
.max(1000000, 'must be at most 1m'),
|
.max(BOUNTY_MAX, `must be at most ${numWithUnits(BOUNTY_MAX)}`),
|
||||||
...advPostSchemaMembers(args),
|
...advPostSchemaMembers(args),
|
||||||
...subSelectSchemaMembers(args)
|
...subSelectSchemaMembers(args)
|
||||||
}).test({
|
}).test({
|
||||||
|
|
Loading…
Reference in New Issue