Skip to content

Commit

Permalink
Merge branch 'LemmyNet:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Oct 31, 2023
2 parents e16e149 + df53d2a commit 6e215cc
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 63 deletions.
10 changes: 10 additions & 0 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ steps:
# need make existing toolchain available
- cargo +nightly fmt -- --check

cargo_machete:
group: format
image: rustlang/rust:nightly
commands:
- wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
- tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
- cp cargo-binstall /usr/local/cargo/bin
- cargo binstall -y cargo-machete
- cargo machete

restore-cache:
image: meltwater/drone-cache:v1
pull: true
Expand Down
36 changes: 0 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ lemmy_federate = { version = "0.19.0-rc.3", path = "crates/federate" }
activitypub_federation = { workspace = true }
diesel = { workspace = true }
diesel-async = { workspace = true }
serde = { workspace = true }
actix-web = { workspace = true }
tracing = { workspace = true }
tracing-actix-web = { workspace = true }
Expand All @@ -154,7 +153,6 @@ reqwest = { workspace = true }
reqwest-middleware = { workspace = true }
reqwest-tracing = { workspace = true }
clokwerk = { workspace = true }
doku = { workspace = true }
serde_json = { workspace = true }
tracing-opentelemetry = { workspace = true, optional = true }
opentelemetry = { workspace = true, optional = true }
Expand All @@ -163,13 +161,8 @@ opentelemetry-otlp = { version = "0.12.0", optional = true }
pict-rs = { version = "0.4.5", optional = true }
tokio.workspace = true
actix-cors = "0.6.4"
rustls = { workspace = true }
futures-util = { workspace = true }
tokio-postgres = { workspace = true }
tokio-postgres-rustls = { workspace = true }
chrono = { workspace = true }
prometheus = { version = "0.13.3", features = ["process"] }
actix-web-prom = { version = "0.6.0" }
serial_test = { workspace = true }
clap = { version = "4.4.7", features = ["derive"] }
actix-web-httpauth = "0.8.1"
3 changes: 0 additions & 3 deletions crates/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ lemmy_db_views_actor = { workspace = true, features = ["full"] }
lemmy_api_common = { workspace = true, features = ["full"] }
activitypub_federation = { workspace = true }
bcrypt = { workspace = true }
serde = { workspace = true }
actix-web = { workspace = true }
base64 = { workspace = true }
uuid = { workspace = true }
async-trait = { workspace = true }
captcha = { workspace = true }
anyhow = { workspace = true }
tracing = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/api/src/local_user/logout.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::read_auth_token;
use activitypub_federation::config::Data;
use actix_web::{cookie::Cookie, HttpRequest, HttpResponse};
use lemmy_api_common::{context::LemmyContext, utils::AUTH_COOKIE_NAME};
use lemmy_api_common::{context::LemmyContext, utils::AUTH_COOKIE_NAME, SuccessResponse};
use lemmy_db_schema::source::login_token::LoginToken;
use lemmy_db_views::structs::LocalUserView;
use lemmy_utils::error::{LemmyErrorType, LemmyResult};
Expand All @@ -16,7 +16,7 @@ pub async fn logout(
let jwt = read_auth_token(&req)?.ok_or(LemmyErrorType::NotLoggedIn)?;
LoginToken::invalidate(&mut context.pool(), &jwt).await?;

let mut res = HttpResponse::Ok().finish();
let mut res = HttpResponse::Ok().json(SuccessResponse::default());
let cookie = Cookie::new(AUTH_COOKIE_NAME, "");
res.add_removal_cookie(&cookie)?;
Ok(res)
Expand Down
3 changes: 3 additions & 0 deletions crates/api_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ jsonwebtoken = { version = "8.3.0", optional = true }
getrandom = { version = "0.2.10", features = ["js"] }
enum-map = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["getrandom"]

[dev-dependencies]
serial_test = { workspace = true }
reqwest-middleware = { workspace = true }
3 changes: 0 additions & 3 deletions crates/api_crud/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ lemmy_db_views_actor = { workspace = true, features = ["full"] }
lemmy_api_common = { workspace = true, features = ["full"] }
activitypub_federation = { workspace = true }
bcrypt = { workspace = true }
serde = { workspace = true }
actix-web = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
async-trait = { workspace = true }
webmention = "0.5.0"
chrono = { workspace = true }
uuid = { workspace = true }
3 changes: 3 additions & 0 deletions crates/db_schema/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ uuid = { workspace = true, features = ["v4"] }

[dev-dependencies]
serial_test = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["strum"]
3 changes: 3 additions & 0 deletions crates/db_views_actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ strum_macros = { workspace = true }
[dev-dependencies]
serial_test = { workspace = true }
tokio = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["strum"]
9 changes: 0 additions & 9 deletions crates/federate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,7 @@ diesel-async = { workspace = true, features = ["deadpool", "postgres"] }
once_cell.workspace = true
reqwest.workspace = true
serde_json.workspace = true
serde.workspace = true
tokio = { workspace = true, features = ["full"] }
tracing.workspace = true

async-trait = "0.1.74"
bytes = "1.5.0"
enum_delegate = "0.2.0"
moka = { version = "0.11.3", features = ["future"] }
openssl = "0.10.57"
reqwest-middleware = "0.2.4"
reqwest-tracing = "0.4.6"
tokio-util = "0.7.9"
tracing-subscriber = "0.3.17"
1 change: 0 additions & 1 deletion crates/routes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ reqwest = { workspace = true, features = ["stream"] }
reqwest-middleware = { workspace = true }
serde = { workspace = true }
url = { workspace = true }
strum = { workspace = true }
once_cell = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true }
Expand Down
2 changes: 0 additions & 2 deletions crates/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ full = ["ts-rs"]

[dependencies]
regex = { workspace = true }
chrono = { workspace = true }
tracing = { workspace = true }
tracing-error = { workspace = true }
itertools = { workspace = true }
Expand All @@ -37,7 +36,6 @@ http = { workspace = true }
doku = { workspace = true, features = ["url-2"] }
uuid = { workspace = true, features = ["serde", "v4"] }
rosetta-i18n = { workspace = true }
typed-builder = { workspace = true }
percent-encoding = { workspace = true }
tokio = { workspace = true }
openssl = "0.10.57"
Expand Down

0 comments on commit 6e215cc

Please sign in to comment.