diondiondion 784f0169e2 [Glitch] Implements tag suggestions for collections topic field
Port 8bce0b99d4c426840de7e48165e1b37bbdefa5de to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2026-03-20 18:15:00 +01:00

26 lines
462 B
TypeScript

import { apiRequestGet } from 'flavours/glitch/api';
import type {
ApiSearchType,
ApiSearchResultsJSON,
} from 'flavours/glitch/api_types/search';
export const apiGetSearch = (
params: {
q: string;
resolve?: boolean;
type?: ApiSearchType;
limit?: number;
offset?: number;
},
options: {
signal?: AbortSignal;
} = {},
) =>
apiRequestGet<ApiSearchResultsJSON>(
'v2/search',
{
...params,
},
options,
);