Skip to content

Commit

Permalink
Fix multi-condition search queries and mark next as optional (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
karashiiro authored Aug 2, 2024
1 parent 824eda1 commit 9854419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const BoilmasterItemSearchResult = z.object({
});

const BoilmasterItemSearchResults = z.object({
next: z.string(),
next: z.string().optional(),
results: z.array(
BoilmasterSheetRow(BoilmasterItemSearchResult).merge(
z.object({
Expand Down Expand Up @@ -139,7 +139,7 @@ export async function searchItemsV2(
const searchUrl = 'https://beta.xivapi.com/api/1/search';
const params = new URLSearchParams({
sheets: 'Item',
query: `Name~"${query}" ItemSearchCategory>=1`,
query: `+Name~"${query}" +ItemSearchCategory>=1`,
language: lang,
limit: '30',
// LevelItem.todo is a nonexistent field, but using that causes an empty fields
Expand Down

0 comments on commit 9854419

Please sign in to comment.