index wvotes for search
This commit is contained in:
parent
760b6b6e10
commit
cb7f68e0e5
|
@ -321,7 +321,6 @@ export default {
|
|||
const items = await models.$queryRaw(`
|
||||
${SELECT}
|
||||
FROM "Item"
|
||||
${await filterClause(me, models)}
|
||||
ORDER BY created_at DESC
|
||||
OFFSET $1
|
||||
LIMIT ${LIMIT}`, decodedCursor.offset)
|
||||
|
@ -800,6 +799,9 @@ export default {
|
|||
|
||||
return sats || 0
|
||||
},
|
||||
wvotes: async (item) => {
|
||||
return item.weightedVotes - item.weightedDownVotes
|
||||
},
|
||||
meSats: async (item, args, { me, models }) => {
|
||||
if (!me) return 0
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ export default gql`
|
|||
commentSats: Int!
|
||||
lastCommentAt: String
|
||||
upvotes: Int!
|
||||
wvotes: Float!
|
||||
meSats: Int!
|
||||
meDontLike: Boolean!
|
||||
outlawed: Boolean!
|
||||
|
|
|
@ -23,6 +23,7 @@ const ITEM_SEARCH_FIELDS = gql`
|
|||
location
|
||||
remote
|
||||
upvotes
|
||||
wvotes
|
||||
sats
|
||||
boost
|
||||
lastCommentAt
|
||||
|
|
Loading…
Reference in New Issue