mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 23:44:22 +00:00
Implement git handlers integration test
This commit is contained in:
@@ -52,6 +52,19 @@ func (h *Handler) CreateWorkspace() http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
if workspace.GitEnabled {
|
||||
if err := h.Storage.SetupGitRepo(
|
||||
ctx.UserID,
|
||||
workspace.ID,
|
||||
workspace.GitURL,
|
||||
workspace.GitUser,
|
||||
workspace.GitToken,
|
||||
); err != nil {
|
||||
http.Error(w, "Failed to setup git repo: "+err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
respondJSON(w, workspace)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user