Compare commits
1 Commits
alex/labri
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d22c9e24f4 |
@ -143,8 +143,13 @@ export default defineNuxtConfig({
|
|||||||
state.lastGenerated &&
|
state.lastGenerated &&
|
||||||
new Date(state.lastGenerated).getTime() + TTL > new Date().getTime() &&
|
new Date(state.lastGenerated).getTime() + TTL > new Date().getTime() &&
|
||||||
// ...but only if the API URL is the same
|
// ...but only if the API URL is the same
|
||||||
state.apiUrl === API_URL
|
state.apiUrl === API_URL &&
|
||||||
|
// ...and if no errors were caught during the last generation
|
||||||
|
(state.errors ?? []).length === 0
|
||||||
) {
|
) {
|
||||||
|
console.log(
|
||||||
|
"Tags already recently generated. Delete apps/frontend/generated/state.json to force regeneration.",
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -512,7 +512,6 @@ pub async fn project_edit(
|
|||||||
moderation_message_body: v2_new_project.moderation_message_body,
|
moderation_message_body: v2_new_project.moderation_message_body,
|
||||||
monetization_status: v2_new_project.monetization_status,
|
monetization_status: v2_new_project.monetization_status,
|
||||||
side_types_migration_review_status: None, // Not to be exposed in v2
|
side_types_migration_review_status: None, // Not to be exposed in v2
|
||||||
loader_fields: HashMap::new(), // Loader fields are not a thing in v2
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This returns 204 or failure so we don't need to do anything with it
|
// This returns 204 or failure so we don't need to do anything with it
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use crate::database::redis::RedisPool;
|
|||||||
use crate::database::{self, models as db_models};
|
use crate::database::{self, models as db_models};
|
||||||
use crate::file_hosting::{FileHost, FileHostPublicity};
|
use crate::file_hosting::{FileHost, FileHostPublicity};
|
||||||
use crate::models;
|
use crate::models;
|
||||||
use crate::models::ids::{ProjectId, VersionId};
|
use crate::models::ids::ProjectId;
|
||||||
use crate::models::images::ImageContext;
|
use crate::models::images::ImageContext;
|
||||||
use crate::models::notifications::NotificationBody;
|
use crate::models::notifications::NotificationBody;
|
||||||
use crate::models::pats::Scopes;
|
use crate::models::pats::Scopes;
|
||||||
@ -250,8 +250,6 @@ pub struct EditProject {
|
|||||||
pub monetization_status: Option<MonetizationStatus>,
|
pub monetization_status: Option<MonetizationStatus>,
|
||||||
pub side_types_migration_review_status:
|
pub side_types_migration_review_status:
|
||||||
Option<SideTypesMigrationReviewStatus>,
|
Option<SideTypesMigrationReviewStatus>,
|
||||||
#[serde(flatten)]
|
|
||||||
pub loader_fields: HashMap<String, serde_json::Value>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
@ -872,29 +870,6 @@ pub async fn project_edit(
|
|||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if !new_project.loader_fields.is_empty() {
|
|
||||||
for version in db_models::DBVersion::get_many(
|
|
||||||
&project_item.versions,
|
|
||||||
&**pool,
|
|
||||||
&redis,
|
|
||||||
)
|
|
||||||
.await?
|
|
||||||
{
|
|
||||||
super::versions::version_edit_helper(
|
|
||||||
req.clone(),
|
|
||||||
(VersionId::from(version.inner.id),),
|
|
||||||
pool.clone(),
|
|
||||||
redis.clone(),
|
|
||||||
super::versions::EditVersion {
|
|
||||||
fields: new_project.loader_fields.clone(),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
session_queue.clone(),
|
|
||||||
)
|
|
||||||
.await?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check new description and body for links to associated images
|
// check new description and body for links to associated images
|
||||||
// if they no longer exist in the description or body, delete them
|
// if they no longer exist in the description or body, delete them
|
||||||
let checkable_strings: Vec<&str> =
|
let checkable_strings: Vec<&str> =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user