use getItem meta helper more places
This commit is contained in:
		
							parent
							
								
									9e38013626
								
							
						
					
					
						commit
						7b60dc5e9f
					
				@ -228,13 +228,13 @@ export default {
 | 
			
		||||
    __resolveType: async (n, args, { models }) => n.type
 | 
			
		||||
  },
 | 
			
		||||
  Votification: {
 | 
			
		||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
			
		||||
    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
			
		||||
  },
 | 
			
		||||
  Reply: {
 | 
			
		||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
			
		||||
    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
			
		||||
  },
 | 
			
		||||
  JobChanged: {
 | 
			
		||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
			
		||||
    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
			
		||||
  },
 | 
			
		||||
  Streak: {
 | 
			
		||||
    days: async (n, args, { models }) => {
 | 
			
		||||
@ -269,7 +269,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  Mention: {
 | 
			
		||||
    mention: async (n, args, { models }) => true,
 | 
			
		||||
    item: async (n, args, { models }) => getItem(n, { id: n.id }, { models })
 | 
			
		||||
    item: async (n, args, { models, me }) => getItem(n, { id: n.id }, { models, me })
 | 
			
		||||
  },
 | 
			
		||||
  InvoicePaid: {
 | 
			
		||||
    invoice: async (n, args, { me, models }) => getInvoice(n, { id: n.id }, { me, models })
 | 
			
		||||
 | 
			
		||||
@ -587,8 +587,8 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
      return msatsToSats(user.msats)
 | 
			
		||||
    },
 | 
			
		||||
    bio: async (user, args, { models }) => {
 | 
			
		||||
      return getItem(user, { id: user.bioId }, { models })
 | 
			
		||||
    bio: async (user, args, { models, me }) => {
 | 
			
		||||
      return getItem(user, { id: user.bioId }, { models, me })
 | 
			
		||||
    },
 | 
			
		||||
    hasInvites: async (user, args, { models }) => {
 | 
			
		||||
      const invites = await models.user.findUnique({
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user