Skip to content

Commit 3ba1142

Browse files
committed
200 seems like a better char count limit
1 parent 05c8a66 commit 3ba1142

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ module.exports = async function ({ plants, nurseries }) {
132132
app.get("/api/v1/autocomplete", async (req, res) => {
133133
try {
134134
const query = req.query.q || "";
135-
if (query && query.length > 500) {
135+
if (query && query.length > 200) {
136136
return res.status(400).json({ error: "Query too long" });
137137
}
138138
if (!query || query.length < 2) {
@@ -295,7 +295,7 @@ module.exports = async function ({ plants, nurseries }) {
295295
page = 1;
296296
}
297297
if (req.query.q && req.query.q.length) {
298-
if (req.query.q.length > 500) {
298+
if (req.query.q.length > 200) {
299299
return res.status(400).json({ error: "Query too long" });
300300
}
301301
// Parse natural language to extract trigger words and set filters

src/components/Explorer.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
<input
7575
v-model="q"
7676
id="q"
77-
placeholder="Search plant name"
77+
placeholder="Search plants or your garden needs"
78+
maxlength="200"
7879
@keydown.enter.prevent="handleSearchSubmit"
7980
@input="handleSearchInput"
8081
@focus="showAutocomplete = true"
@@ -411,7 +412,8 @@
411412
id="q-mobile"
412413
type="text"
413414
class="search-mobile"
414-
placeholder="Search plant name"
415+
placeholder="Search plants or your garden needs"
416+
maxlength="200"
415417
@keydown.enter.prevent="handleSearchSubmit"
416418
@input="handleSearchInput"
417419
@focus="showAutocomplete = true"

0 commit comments

Comments
 (0)