mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix(backend): postType as array in searchPosts
This commit is contained in:
parent
30fa8d883e
commit
b1b26862a6
@ -110,7 +110,13 @@ const searchResultPromise = async (session, setup, params) => {
|
||||
}
|
||||
|
||||
const searchResultCallback = (result) => {
|
||||
return result.records.map((r) => r.get('result'))
|
||||
const response = result.records.map((r) => r.get('result'))
|
||||
if (Array.isArray(response) && response.length && response[0].__typename === 'Post') {
|
||||
response.forEach((post) => {
|
||||
post.postType = [post.postType]
|
||||
})
|
||||
}
|
||||
return response
|
||||
}
|
||||
|
||||
const countResultCallback = (result) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user