Fix unexpected token 'export'

This commit is contained in:
ekzyis 2023-07-26 22:07:06 +02:00
parent ba04e6522d
commit c975bd8ebd
1 changed files with 43 additions and 46 deletions

View File

@ -1,50 +1,47 @@
export const NOFOLLOW_LIMIT = 100
export const BOOST_MIN = 5000
export const UPLOAD_SIZE_MAX = 2 * 1024 * 1024
export const IMAGE_PIXELS_MAX = 35000000
export const UPLOAD_TYPES_ALLOW = [
'image/gif',
'image/heic',
'image/png',
'image/jpeg',
'image/webp'
]
export const COMMENT_DEPTH_LIMIT = 10
export const MAX_TITLE_LENGTH = 80
export const MAX_POLL_CHOICE_LENGTH = 30
export const ITEM_SPAM_INTERVAL = '10m'
export const MAX_POLL_NUM_CHOICES = 10
export const MIN_POLL_NUM_CHOICES = 2
export const ITEM_FILTER_THRESHOLD = 1.2
export const DONT_LIKE_THIS_COST = 1
export const COMMENT_TYPE_QUERY = ['comments', 'freebies', 'outlawed', 'borderland', 'all', 'bookmarks']
// XXX this is temporary until we have so many subs they have // XXX this is temporary until we have so many subs they have
// to be loaded from the server // to be loaded from the server
export const SUBS = ['bitcoin', 'nostr', 'tech', 'meta', 'jobs'] const SUBS = ['bitcoin', 'nostr', 'tech', 'meta', 'jobs']
export const SUBS_NO_JOBS = SUBS.filter(s => s !== 'jobs') const SUBS_NO_JOBS = SUBS.filter(s => s !== 'jobs')
export const USER_SORTS = ['stacked', 'spent', 'comments', 'posts', 'referrals']
export const ITEM_SORTS = ['votes', 'comments', 'sats']
export const WHENS = ['day', 'week', 'month', 'year', 'forever']
export const ITEM_TYPES = context => { module.exports = {
if (context === 'jobs') { NOFOLLOW_LIMIT: 100,
return ['posts', 'comments', 'all', 'freebies'] BOOST_MIN: 5000,
} UPLOAD_SIZE_MAX: 2 * 1024 * 1024,
IMAGE_PIXELS_MAX: 35000000,
const items = ['all', 'posts', 'comments', 'bounties', 'links', 'discussions', 'polls'] UPLOAD_TYPES_ALLOW: [
if (!context) { 'image/gif',
items.push('bios', 'jobs') 'image/heic',
} 'image/png',
items.push('freebies') 'image/jpeg',
if (context === 'user') { 'image/webp'
items.push('jobs', 'bookmarks') ],
} COMMENT_DEPTH_LIMIT: 10,
return items MAX_TITLE_LENGTH: 80,
MAX_POLL_CHOICE_LENGTH: 30,
ITEM_SPAM_INTERVAL: '10m',
MAX_POLL_NUM_CHOICES: 10,
MIN_POLL_NUM_CHOICES: 2,
ITEM_FILTER_THRESHOLD: 1.2,
DONT_LIKE_THIS_COST: 1,
COMMENT_TYPE_QUERY: ['comments', 'freebies', 'outlawed', 'borderland', 'all', 'bookmarks'],
SUBS,
SUBS_NO_JOBS,
USER_SORTS: ['stacked', 'spent', 'comments', 'posts', 'referrals'],
ITEM_SORTS: ['votes', 'comments', 'sats'],
WHENS: ['day', 'week', 'month', 'year', 'forever'],
ITEM_TYPES: context => {
const items = ['all', 'posts', 'comments', 'bounties', 'links', 'discussions', 'polls']
if (!context) {
items.push('bios', 'jobs')
}
items.push('freebies')
if (context === 'user') {
items.push('jobs', 'bookmarks')
}
return items
},
OLD_ITEM_DAYS: 3,
ANON_USER_ID: 27,
ANON_POST_FEE: 1000,
ANON_COMMENT_FEE: 100,
} }
export const OLD_ITEM_DAYS = 3
export const ANON_USER_ID = 27
export const ANON_POST_FEE = 1000
export const ANON_COMMENT_FEE = 100