Have app send download analytics meta (#5954)
* wip: add download reasons to app * update how download meta is gathered * cargo fmt * prepr frontend
This commit is contained in:
@@ -109,6 +109,7 @@ pub async fn profile_create(
|
||||
let fetched = crate::util::fetch::fetch(
|
||||
icon,
|
||||
None,
|
||||
None,
|
||||
&state.fetch_semaphore,
|
||||
&state.pool,
|
||||
)
|
||||
|
||||
@@ -461,6 +461,7 @@ pub async fn update_project(
|
||||
let mut path = Profile::add_project_version(
|
||||
profile_path,
|
||||
update_version,
|
||||
fetch::DownloadReason::Standalone,
|
||||
&state.pool,
|
||||
&state.fetch_semaphore,
|
||||
&state.io_semaphore,
|
||||
@@ -501,11 +502,14 @@ pub async fn update_project(
|
||||
pub async fn add_project_from_version(
|
||||
profile_path: &str,
|
||||
version_id: &str,
|
||||
reason: fetch::DownloadReason,
|
||||
) -> crate::Result<String> {
|
||||
let state = State::get().await?;
|
||||
|
||||
let project_path = Profile::add_project_version(
|
||||
profile_path,
|
||||
version_id,
|
||||
reason,
|
||||
&state.pool,
|
||||
&state.fetch_semaphore,
|
||||
&state.io_semaphore,
|
||||
|
||||
Reference in New Issue
Block a user