【发布时间】:2021-03-01 04:24:07
【问题描述】:
The Strapi documentation is apparently silent on this, 除非我遗漏了什么。此处显示的示例仅通过字符串或数值查询字段。
我自己试过但没有用的方法:
http://localhost:1337/restaurants?vegan=true
http://localhost:1337/restaurants?vegan=1
http://localhost:1337/restaurants?vegan=0
http://localhost:1337/restaurants?vegan=null
我知道这很棘手,因为谁会说 true 并不意味着文字字符串 "true"。那么如何通过 API 端点查询布尔字段的值呢?
【问题讨论】:
标签: strapi