cargo,app,auth: Update dependencies, fix breaks

This commit is contained in:
Valentin Tolmer
2024-10-16 23:43:14 +02:00
committed by nitnelave
parent 11d766b2ba
commit abfe2f3a17
7 changed files with 1237 additions and 1057 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Keep tracking base image # Keep tracking base image
FROM rust:1.76-slim-bookworm FROM rust:1.81-slim-bookworm
# Set needed env path # Set needed env path
ENV PATH="/opt/armv7l-linux-musleabihf-cross/:/opt/armv7l-linux-musleabihf-cross/bin/:/opt/aarch64-linux-musl-cross/:/opt/aarch64-linux-musl-cross/bin/:/opt/x86_64-linux-musl-cross/:/opt/x86_64-linux-musl-cross/bin/:$PATH" ENV PATH="/opt/armv7l-linux-musleabihf-cross/:/opt/armv7l-linux-musleabihf-cross/bin/:/opt/aarch64-linux-musl-cross/:/opt/aarch64-linux-musl-cross/bin/:/opt/x86_64-linux-musl-cross/:/opt/x86_64-linux-musl-cross/bin/:$PATH"
+3 -3
View File
@@ -39,7 +39,7 @@ env:
# GitHub actions randomly timeout when downloading musl-gcc, using custom dev image # # GitHub actions randomly timeout when downloading musl-gcc, using custom dev image #
# Look into .github/workflows/Dockerfile.dev for development image details # # Look into .github/workflows/Dockerfile.dev for development image details #
# Using lldap dev image based on https://hub.docker.com/_/rust and musl-gcc bundled # # Using lldap dev image based on https://hub.docker.com/_/rust and musl-gcc bundled #
# lldap/rust-dev:latest # # lldap/rust-dev #
####################################################################################### #######################################################################################
# Cargo build # Cargo build
### armv7, aarch64 and amd64 is musl based ### armv7, aarch64 and amd64 is musl based
@@ -84,7 +84,7 @@ jobs:
needs: pre_job needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.event_name == 'release' }} if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.event_name == 'release' }}
container: container:
image: lldap/rust-dev:latest image: lldap/rust-dev:v81
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4.2.1 uses: actions/checkout@v4.2.1
@@ -125,7 +125,7 @@ jobs:
matrix: matrix:
target: [armv7-unknown-linux-musleabihf, aarch64-unknown-linux-musl, x86_64-unknown-linux-musl] target: [armv7-unknown-linux-musleabihf, aarch64-unknown-linux-musl, x86_64-unknown-linux-musl]
container: container:
image: lldap/rust-dev:latest image: lldap/rust-dev:v81
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUSTFLAGS: -Ctarget-feature=+crt-static RUSTFLAGS: -Ctarget-feature=+crt-static
Generated
+1220 -1042
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -22,8 +22,8 @@ rand = "0.8"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
url-escape = "0.1.1" url-escape = "0.1.1"
validator = "=0.14" validator = "0.14"
validator_derive = "*" validator_derive = "0.14"
wasm-bindgen = "0.2" wasm-bindgen = "0.2"
wasm-bindgen-futures = "*" wasm-bindgen-futures = "*"
yew = "0.19.3" yew = "0.19.3"
+1 -1
View File
@@ -40,7 +40,7 @@ pub fn date_time_input(props: &DateTimeInputProps) -> Html {
value.set( value.set(
NaiveDateTime::from_str(&string_val) NaiveDateTime::from_str(&string_val)
.ok() .ok()
.map(|x| DateTime::from_utc(x, Utc)) .map(|x| DateTime::from_naive_utc_and_offset(x, Utc))
) )
}} /> }} />
<span class="input-group-text">{"UTC"}</span> <span class="input-group-text">{"UTC"}</span>
+9 -7
View File
@@ -1,6 +1,6 @@
use super::cookies::set_cookie; use super::cookies::set_cookie;
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use gloo_net::http::{Method, Request}; use gloo_net::http::{Method, RequestBuilder};
use graphql_client::GraphQLQuery; use graphql_client::GraphQLQuery;
use lldap_auth::{login, registration, JWTClaims}; use lldap_auth::{login, registration, JWTClaims};
@@ -32,14 +32,16 @@ async fn call_server<Body: Serialize>(
body: RequestType<Body>, body: RequestType<Body>,
error_message: &'static str, error_message: &'static str,
) -> Result<String> { ) -> Result<String> {
let mut request = Request::new(url) let request_builder = RequestBuilder::new(url)
.header("Content-Type", "application/json") .header("Content-Type", "application/json")
.credentials(RequestCredentials::SameOrigin); .credentials(RequestCredentials::SameOrigin);
if let RequestType::Post(b) = body { let request = if let RequestType::Post(b) = body {
request = request request_builder
.body(serde_json::to_string(&b)?) .method(Method::POST)
.method(Method::POST); .body(serde_json::to_string(&b)?)?
} } else {
request_builder.build()?
};
let response = request.send().await?; let response = request.send().await?;
if response.ok() { if response.ok() {
Ok(response.text().await?) Ok(response.text().await?)
+1 -1
View File
@@ -108,7 +108,7 @@ pub mod types {
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[cfg(feature = "sea_orm")] #[cfg(feature = "sea_orm")]
use sea_orm::{DbErr, DeriveValueType, QueryResult, TryFromU64, Value}; use sea_orm::{DbErr, DeriveValueType, TryFromU64, Value};
#[derive( #[derive(
PartialEq, Eq, PartialOrd, Ord, Clone, Debug, Default, Hash, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Clone, Debug, Default, Hash, Serialize, Deserialize,