mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-03-30 15:09:35 +00:00
Remove hardcoded ratelimit (#5551)
* Remove hardcoded ratelimit * needed for api tests
This commit is contained in:
parent
0c1d9c9350
commit
1743f21258
2 changed files with 12 additions and 14 deletions
|
@ -156,12 +156,6 @@ export async function setupLogins() {
|
|||
// Registration applications are now enabled by default, need to disable them
|
||||
let editSiteForm: EditSite = {
|
||||
registration_mode: "Open",
|
||||
rate_limit_message: 999,
|
||||
rate_limit_post: 999,
|
||||
rate_limit_register: 999,
|
||||
rate_limit_image: 999,
|
||||
rate_limit_comment: 999,
|
||||
rate_limit_search: 999,
|
||||
};
|
||||
await alpha.editSite(editSiteForm);
|
||||
await beta.editSite(editSiteForm);
|
||||
|
|
|
@ -453,14 +453,18 @@ async fn initialize_local_site_2022_10_10(
|
|||
let local_site = LocalSite::create(pool, &local_site_form).await?;
|
||||
|
||||
// Create the rate limit table
|
||||
let local_site_rate_limit_form = LocalSiteRateLimitInsertForm {
|
||||
message: Some(999),
|
||||
post: Some(999),
|
||||
register: Some(999),
|
||||
image: Some(999),
|
||||
comment: Some(999),
|
||||
search: Some(999),
|
||||
..LocalSiteRateLimitInsertForm::new(local_site.id)
|
||||
let local_site_rate_limit_form = if cfg!(debug_assertions) {
|
||||
LocalSiteRateLimitInsertForm {
|
||||
message: Some(999),
|
||||
post: Some(999),
|
||||
register: Some(999),
|
||||
image: Some(999),
|
||||
comment: Some(999),
|
||||
search: Some(999),
|
||||
..LocalSiteRateLimitInsertForm::new(local_site.id)
|
||||
}
|
||||
} else {
|
||||
LocalSiteRateLimitInsertForm::new(local_site.id)
|
||||
};
|
||||
// TODO these have to be set, because the database defaults are too low for the federation
|
||||
// tests to pass, and there's no way to live update the rate limits without restarting the
|
||||
|
|
Loading…
Reference in a new issue