mirror of
https://github.com/qwertyforce/scenery.git
synced 2025-05-31 11:42:35 +00:00
trim search query
This commit is contained in:
parent
c6a13f5552
commit
d4c953de98
@ -39,7 +39,7 @@ export default function Search(props:any){
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export async function getServerSideProps(context: any) {
|
||||
if (context.query.q) {
|
||||
const tags = context.query.q.split(',')
|
||||
const tags = (context.query.q.split(',')).map((tag:string)=>tag.trim())
|
||||
const images = await db_ops.image_ops.find_images_by_tags(tags)
|
||||
const images_on_page = 30
|
||||
const photos = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user