feat(#2302): thread &Ident through agent path builders
This commit is contained in:
parent
1286029947
commit
bf644cc126
23 changed files with 168 additions and 85 deletions
|
|
@ -111,7 +111,7 @@ pub(super) async fn get_matrix_accounts(Query(q): Query<MatrixAccountsQuery>) ->
|
|||
return error_response(&format!("matrix-accounts: invalid agent name {agent:?}"));
|
||||
};
|
||||
|
||||
let dir = Coordinator::agent_notes_dir(agent.as_str());
|
||||
let dir = Coordinator::agent_notes_dir(&agent);
|
||||
let (snapshot, as_of_unix) = read_accounts_snapshot(&dir);
|
||||
let mut accounts = Vec::new();
|
||||
match std::fs::read_dir(&dir) {
|
||||
|
|
@ -313,7 +313,7 @@ pub(super) async fn get_github_account(Query(q): Query<GithubAccountQuery>) -> R
|
|||
let Ok(agent) = Ident::parse(agent) else {
|
||||
return error_response(&format!("github-account: invalid agent {agent:?}"));
|
||||
};
|
||||
let present = Coordinator::agent_notes_dir(agent.as_str())
|
||||
let present = Coordinator::agent_notes_dir(&agent)
|
||||
.join("github-token")
|
||||
.exists();
|
||||
axum::Json(GithubAccountStatus { present }).into_response()
|
||||
|
|
|
|||
Loading…
Reference in a new issue