Upping rust version, fixing min length.
This commit is contained in:
parent
c4ec807f68
commit
c8ffc61d16
|
@ -9,7 +9,7 @@ RUN yarn install --pure-lockfile
|
||||||
COPY server/ui /app/ui
|
COPY server/ui /app/ui
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM rust:1.39 as rust
|
FROM rust:1.42 as rust
|
||||||
|
|
||||||
# Install musl
|
# Install musl
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
|
@ -93,7 +93,7 @@ fn search_query(
|
||||||
) -> Result<Value, Error> {
|
) -> Result<Value, Error> {
|
||||||
|
|
||||||
let q = query.q.trim();
|
let q = query.q.trim();
|
||||||
if q.is_empty() || q.len() <= 3 {
|
if q.is_empty() || q.len() < 3 {
|
||||||
return Err(format_err!("{{\"error\": \"{}\"}}", "Empty query".to_string()));
|
return Err(format_err!("{{\"error\": \"{}\"}}", "Empty query".to_string()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ export class Navbar extends Component<any, State> {
|
||||||
<form class="col-12 col-sm-6 m-0 px-1" onSubmit={linkEvent(this, this.search)}>
|
<form class="col-12 col-sm-6 m-0 px-1" onSubmit={linkEvent(this, this.search)}>
|
||||||
<div class="input-group w-100">
|
<div class="input-group w-100">
|
||||||
<input class="form-control border-left-0 border-top-0 border-bottom-0 no-outline" type="search" placeholder="Search..." aria-label="Search..." required
|
<input class="form-control border-left-0 border-top-0 border-bottom-0 no-outline" type="search" placeholder="Search..." aria-label="Search..." required
|
||||||
minLength={4}
|
minLength={3}
|
||||||
value={this.state.searchParams.q}
|
value={this.state.searchParams.q}
|
||||||
onInput={linkEvent(this, this.searchChange)}></input>
|
onInput={linkEvent(this, this.searchChange)}></input>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
|
|
Loading…
Reference in New Issue