mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-25 04:26:00 -05:00
backend plus maplists route
This commit is contained in:
@@ -10,6 +10,7 @@ const maps = require("../utils/maps")
|
||||
const typeDef = gql`
|
||||
extend type Query {
|
||||
maplists: [Maplist!]!
|
||||
plusMaplists: [Maplist!]!
|
||||
mapVotes: [MapVote!]
|
||||
}
|
||||
|
||||
@@ -70,6 +71,9 @@ const resolvers = {
|
||||
})
|
||||
})
|
||||
},
|
||||
plusMaplists: (root, args) => {
|
||||
return Maplist.find({ plus: { $ne: null } })
|
||||
},
|
||||
mapVotes: async (root, args, ctx) => {
|
||||
if (!ctx.user || !ctx.user.plus || !ctx.user.plus.membership_status) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user