Skip to content

Commit

Permalink
Upgrade Lemmy backend to 0.17.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic committed Jan 12, 2023
1 parent 353f993 commit c04dd70
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 20 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ embed-lemmy = ["lemmy_server", "send_wrapper"]
[dependencies]
log = "0.4.17"
env_logger = { version = "0.9.1", features = ["termcolor", "humantime", "atty"], default-features = false }
lemmy_api_common = { git = "https://github.com/LemmyNet/lemmy.git" }
lemmy_server = { git = "https://github.com/LemmyNet/lemmy.git", optional = true }
lemmy_api_common = { git = "https://github.com/LemmyNet/lemmy.git", tag = "0.17.0-rc.1" }
lemmy_server = { git = "https://github.com/LemmyNet/lemmy.git", tag = "0.17.0-rc.1", optional = true }
once_cell = "1.15.0"
anyhow = "1.0.66"
rocket = { version = "0.5.0-rc.2", default-features = false }
Expand All @@ -41,5 +41,5 @@ send_wrapper = { version = "0.6.0", features = ["futures"], optional = true }
[dev-dependencies]
serial_test = "0.9.0"
ctor = "0.1.26"
lemmy_server = { git = "https://github.com/LemmyNet/lemmy.git" }
lemmy_server = { git = "https://github.com/LemmyNet/lemmy.git", tag = "0.17.0-rc.1" }
actix-rt = "2.7.0"
5 changes: 3 additions & 2 deletions src/api/site.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::api::{get, post};
use anyhow::Error;
use futures::future::join;
use lemmy_api_common::{
lemmy_db_schema::source::local_site::RegistrationMode,
sensitive::Sensitive,
site::{
CreateSite,
Expand All @@ -16,13 +17,13 @@ use lemmy_api_common::{
pub async fn create_site(
name: String,
description: Option<String>,
require_application: bool,
registration_mode: RegistrationMode,
auth: Sensitive<String>,
) -> Result<SiteResponse, Error> {
let params = CreateSite {
name,
description,
require_application: Some(require_application),
registration_mode: Some(registration_mode),
auth,
..Default::default()
};
Expand Down
4 changes: 2 additions & 2 deletions src/routes/site.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
use anyhow::Error;
use futures::future::join_all;
use lemmy_api_common::{
lemmy_db_schema::ListingType,
lemmy_db_schema::{source::local_site::RegistrationMode, ListingType},
lemmy_db_views_actor::structs::CommunityView,
};
use rocket::{form::Form, http::CookieJar, response::Redirect, Either};
Expand Down Expand Up @@ -116,7 +116,7 @@ pub async fn do_setup(
create_site(
form.site_name.clone(),
form.site_description.clone(),
true,
RegistrationMode::RequireApplication,
jwt,
)
.await?;
Expand Down
8 changes: 6 additions & 2 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ use crate::{
routes::{community::*, post::*, site::*, user::*},
site_fairing::test_site_data,
};
use lemmy_api_common::{sensitive::Sensitive, site::GetSiteResponse};
use lemmy_api_common::{
lemmy_db_schema::source::local_site::RegistrationMode,
sensitive::Sensitive,
site::GetSiteResponse,
};
use log::LevelFilter;
use rand::{distributions::Alphanumeric, Rng};
use reqwest::StatusCode;
Expand Down Expand Up @@ -88,7 +92,7 @@ async fn init_backend() -> Sensitive<String> {
create_site(
"test".to_string(),
Some("test".to_string()),
false,
RegistrationMode::Open,
auth.clone(),
)
.await
Expand Down

0 comments on commit c04dd70

Please sign in to comment.