mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 17:14:50 +00:00
Allow searching by project dependencies (#6350)
* Allow searching by project dependencies * change field name * use query macro
This commit is contained in:
@@ -214,12 +214,31 @@ pub async fn setup_search_projects(
|
||||
USER_USER_PAT,
|
||||
)
|
||||
.await;
|
||||
let project_1 = api
|
||||
.get_project_deserialized_common(
|
||||
&format!("{test_name}-searchable-project-1"),
|
||||
USER_USER_PAT,
|
||||
)
|
||||
.await;
|
||||
let modify_json = serde_json::from_value(json!([
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/dependencies",
|
||||
"value": [
|
||||
{
|
||||
"project_id": project_1.id,
|
||||
"dependency_type": "required"
|
||||
}
|
||||
]
|
||||
}
|
||||
]))
|
||||
.unwrap();
|
||||
api.add_public_version(
|
||||
project_7.id,
|
||||
"1.0.0",
|
||||
TestFile::build_random_jar(),
|
||||
None,
|
||||
None,
|
||||
Some(modify_json),
|
||||
USER_USER_PAT,
|
||||
)
|
||||
.await;
|
||||
|
||||
Reference in New Issue
Block a user