Update handlers and db

This commit is contained in:
2024-11-30 16:12:51 +01:00
parent 4359267d55
commit 31d00681a1
7 changed files with 48 additions and 29 deletions

View File

@@ -64,6 +64,8 @@ func (h *Handler) CreateWorkspace() http.HandlerFunc {
workspace.GitURL,
workspace.GitUser,
workspace.GitToken,
workspace.GitCommitName,
workspace.GitCommitEmail,
); err != nil {
http.Error(w, "Failed to setup git repo: "+err.Error(), http.StatusInternalServerError)
return
@@ -96,7 +98,9 @@ func gitSettingsChanged(new, old *models.Workspace) bool {
if new.GitEnabled {
return new.GitURL != old.GitURL ||
new.GitUser != old.GitUser ||
new.GitToken != old.GitToken
new.GitToken != old.GitToken ||
new.GitCommitName != old.GitCommitName ||
new.GitCommitEmail != old.GitCommitEmail
}
return false
@@ -135,6 +139,8 @@ func (h *Handler) UpdateWorkspace() http.HandlerFunc {
workspace.GitURL,
workspace.GitUser,
workspace.GitToken,
workspace.GitCommitName,
workspace.GitCommitEmail,
); err != nil {
http.Error(w, "Failed to setup git repo: "+err.Error(), http.StatusInternalServerError)
return