mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-03-01 12:44:37 +00:00
lint
This commit is contained in:
parent
e036678dbc
commit
c3aa23ad12
@ -147,7 +147,11 @@ const multiSearchMap = [
|
||||
export default {
|
||||
Query: {
|
||||
searchPosts: (_parent, args, context, _resolveInfo) => {
|
||||
const { query, postsOffset, firstPosts } = args as { query: string; postsOffset: number; firstPosts: number }
|
||||
const { query, postsOffset, firstPosts } = args as {
|
||||
query: string
|
||||
postsOffset: number
|
||||
firstPosts: number
|
||||
}
|
||||
let userId = null
|
||||
if (context.user) userId = context.user.id
|
||||
return {
|
||||
@ -170,7 +174,11 @@ export default {
|
||||
}
|
||||
},
|
||||
searchUsers: (_parent, args, context, _resolveInfo) => {
|
||||
const { query, usersOffset, firstUsers } = args as { query: string; usersOffset: number; firstUsers: number }
|
||||
const { query, usersOffset, firstUsers } = args as {
|
||||
query: string
|
||||
usersOffset: number
|
||||
firstUsers: number
|
||||
}
|
||||
return {
|
||||
userCount: getSearchResults(
|
||||
context,
|
||||
@ -189,7 +197,11 @@ export default {
|
||||
}
|
||||
},
|
||||
searchHashtags: (_parent, args, context, _resolveInfo) => {
|
||||
const { query, hashtagsOffset, firstHashtags } = args as { query: string; hashtagsOffset: number; firstHashtags: number }
|
||||
const { query, hashtagsOffset, firstHashtags } = args as {
|
||||
query: string
|
||||
hashtagsOffset: number
|
||||
firstHashtags: number
|
||||
}
|
||||
return {
|
||||
hashtagCount: getSearchResults(
|
||||
context,
|
||||
@ -208,7 +220,11 @@ export default {
|
||||
}
|
||||
},
|
||||
searchGroups: (_parent, args, context, _resolveInfo) => {
|
||||
const { query, groupsOffset, firstGroups } = args as { query: string; groupsOffset: number; firstGroups: number }
|
||||
const { query, groupsOffset, firstGroups } = args as {
|
||||
query: string
|
||||
groupsOffset: number
|
||||
firstGroups: number
|
||||
}
|
||||
let userId = null
|
||||
if (context.user) userId = context.user.id
|
||||
return {
|
||||
|
||||
@ -157,7 +157,10 @@ export const createOrUpdateLocations = async (
|
||||
})
|
||||
}
|
||||
|
||||
export const queryLocations = async ({ place, lang }: { place: string; lang: string }, context: Context) => {
|
||||
export const queryLocations = async (
|
||||
{ place, lang }: { place: string; lang: string },
|
||||
context: Context,
|
||||
) => {
|
||||
const res: any = await fetch(
|
||||
`https://api.mapbox.com/geocoding/v5/mapbox.places/${place}.json?access_token=${context.config.MAPBOX_TOKEN}&types=region,place,country&language=${lang}`,
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user