searchHistory.client.ts 472 B

123456789101112
  1. import httpClient from "@/services/httpClient";
  2. import type { Response } from "@/types/response.types";
  3. import * as urlHelper from "@/libs/url.lib"
  4. import type { HotKeyword } from "@/types/searchHistory.types";
  5. const _url = urlHelper.withPrefix("/gw/user/searchHistory");
  6. export async function getHoyKeyword(size: number): Promise<HotKeyword[]> {
  7. const resp = await httpClient.get<Response<HotKeyword[]>>(_url(`/getHotKeyword?size=${size}`))
  8. return resp.data.data
  9. }