From 024fddea2cc55727fde821f7fa1d348b19cd9a06 Mon Sep 17 00:00:00 2001 From: Aitzol Berasategi Date: Mon, 23 Jun 2025 10:53:47 +0200 Subject: [PATCH] adapting for raspberry pi --- Dockerfile | 5 +++-- rust-toolchain | 2 +- src/routes/session.rs | 2 +- wasm-deps.sh | 25 +++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 wasm-deps.sh diff --git a/Dockerfile b/Dockerfile index 344ffaa2..713199c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,11 +13,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libssl-dev \ clang +RUN ln -s /usr/bin/python3 /usr/bin/python & \ + ln -s /usr/bin/pip3 /usr/bin/pip + WORKDIR /scratch COPY script/wasm-deps.sh . RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh -RUN ln -s /usr/bin/python3 /usr/bin/python & \ - ln -s /usr/bin/pip3 /usr/bin/pip WORKDIR /app diff --git a/rust-toolchain b/rust-toolchain index f3ee8151..168029d9 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-07-19 +nightly-2024-08-30 diff --git a/src/routes/session.rs b/src/routes/session.rs index 1eab9693..92a5003e 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -54,7 +54,7 @@ pub fn create( Ok(_) => ValidationErrors::new(), Err(e) => e, }; - let user = User::login(&conn, &form.email_or_name, &form.password); + let user = User::login(&conn, &form.email_or_name.to_lowercase(), &form.password); let user_id = if let Ok(user) = user { user.id.to_string() } else { diff --git a/wasm-deps.sh b/wasm-deps.sh new file mode 100644 index 00000000..fff507f5 --- /dev/null +++ b/wasm-deps.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +ARCH=$(python <