refactor!: setup file proxy for projects

This commit is contained in:
2026-01-20 19:10:01 -08:00
parent 5eccfe32da
commit a2afc3fa05
17 changed files with 279 additions and 103 deletions

View File

@@ -6,9 +6,11 @@ use crate::AppState;
pub async fn add_repo(
app_state: web::Data<AppState>,
user: web::ReqData<User>,
payload: web::Json<RepositorySchema>,
repo: web::Json<RepositorySchema>,
) -> Result<HttpResponse> {
let repo = payload.into_inner();
validate_repo(app_state.clone(), &repo).await?;
app_state.user.add_repository(&user.id, repo).await
validate_repo(app_state.clone(), &repo, &user.id).await?;
app_state
.user
.add_repository(&user.id, repo.into_inner())
.await
}