Add list_repos_summary Tauri command

This commit is contained in:
Rūdolfs Ošiņš
2026-03-20 14:06:48 -06:00
parent a6af849959
commit 8b2df264af
6 changed files with 52 additions and 0 deletions
+6
View File
@@ -63,6 +63,7 @@ pub fn router(ctx: Context) -> Router {
.route("/authenticate", post(auth_handler))
.route("/repo_count", post(repo_count_handler))
.route("/list_repos", post(repo_root_handler))
.route("/list_repos_summary", post(list_repos_summary_handler))
.route("/repo_by_id", post(repo_handler))
.route("/version", post(version_handler))
.route("/diff_stats", post(diff_stats_handler))
@@ -131,6 +132,11 @@ async fn repo_count_handler(State(ctx): State<Context>) -> impl IntoResponse {
Ok::<_, Error>(Json(repos))
}
async fn list_repos_summary_handler(State(ctx): State<Context>) -> impl IntoResponse {
let repos = ctx.list_repos_summary()?;
Ok::<_, Error>(Json(repos))
}
#[derive(Serialize, Deserialize)]
struct RepoBody {
pub rid: identity::RepoId,