Skip to content

Commit

Permalink
make where operator optional
Browse files Browse the repository at this point in the history
  • Loading branch information
andyslack committed Dec 30, 2024
1 parent 6ee4b66 commit 2a808b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nuxtjs/src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ export default defineNuxtPlugin(({ $config }) => {

if (options.where && options.where.length) {
for (const w of options.where) {
url += `${w.field}[${w.operator}]=${w.value}&`
if(w.operator){
url += `${w.field}[${w.operator}]=${w.value}&`
}else{
url += `${w.field}=${w.value}&`
}
}
}

Expand Down

0 comments on commit 2a808b8

Please sign in to comment.