mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
simplyfy logic, use language ahortcuts
This commit is contained in:
parent
a10916fc14
commit
ca24cf4405
@ -223,8 +223,7 @@ export default {
|
||||
},
|
||||
searchResults: async (_parent, args, context, _resolveInfo) => {
|
||||
const { query, limit } = args
|
||||
let userId = null
|
||||
if (context.user) userId = context.user.id
|
||||
let userId = context.user?.id || null
|
||||
|
||||
const searchType = query.replace(/^([!@#&]?).*$/, '$1')
|
||||
const searchString = query.replace(/^([!@#&])/, '')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user