research_topics::create: bag 8 args into a NewTopic struct (fixes clippy)
The prior signature took (pool, workspace_id, title, description, outcome_kind, topology_kind, repo_id, created_by) — 8 args, one over the clippy::too_many_arguments ceiling and blocking CI. Refactor to a NewTopic<'a> input struct mirroring the NewLoop / NewSubTopology pattern the codebase already uses. Wizard-side additions like a repo commit branch land as struct fields instead of cascading into every call site.
This commit is contained in:
@@ -368,13 +368,15 @@ pub async fn create_topic(
|
||||
|
||||
let id = cm_db::repo::research_topics::create(
|
||||
&state.pool,
|
||||
user.workspace_id.as_uuid(),
|
||||
body.title.trim(),
|
||||
body.description.trim(),
|
||||
&body.outcome_kind,
|
||||
topology_kind,
|
||||
repo_id,
|
||||
user.user_id.as_uuid(),
|
||||
cm_db::repo::research_topics::NewTopic {
|
||||
workspace_id: user.workspace_id.as_uuid(),
|
||||
title: body.title.trim(),
|
||||
description: body.description.trim(),
|
||||
outcome_kind: &body.outcome_kind,
|
||||
topology_kind,
|
||||
repo_id,
|
||||
created_by: user.user_id.as_uuid(),
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user