Merge pull request #66 from vnepogodin/main

fix backend build
This commit is contained in:
AppFlowy.IO 2021-11-22 09:01:46 +08:00 committed by GitHub
commit 0bbf9c3ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1,4 @@
FROM rust:1.53.0
FROM rust:1.56.1
# Let's switch our working directory to `app` (equivalent to `cd app`)
# The `app` folder will be created for us by Docker in case it does not
# exist already.
@ -10,7 +9,7 @@ COPY . .
WORKDIR /app/backend
ENV SQLX_OFFLINE true
ENV APP_ENVIRONMENT production
RUN cargo build --release
RUN RUSTFLAGS="-C opt-level=2" cargo build --release
# When `docker run` is executed, launch the binary!
ENTRYPOINT ["./target/release/backend"]

View File

@ -80,7 +80,7 @@ use backend_service::config::HEADER_TOKEN;
use futures::future::{ready, Ready};
impl FromRequest for Token {
type Config = ();
//type Config = ();
type Error = ServerError;
type Future = Ready<Result<Self, Self::Error>>;

View File

@ -41,7 +41,7 @@ use actix_web::{dev::Payload, FromRequest, HttpRequest};
use futures::future::{ready, Ready};
impl FromRequest for LoggedUser {
type Config = ();
//type Config = ();
type Error = ServerError;
type Future = Ready<Result<Self, Self::Error>>;