retry repo create
This commit is contained in:
parent
4e6ad3cd26
commit
515d90cc9e
7 changed files with 88 additions and 19 deletions
|
|
@ -136,6 +136,8 @@ func (a *App) handleProjectSubroutes(w http.ResponseWriter, r *http.Request, use
|
|||
a.handleProjectEnv(w, r, user, projectID)
|
||||
case "service":
|
||||
a.handleServiceRegenerate(w, r, user, projectID)
|
||||
case "reprovision":
|
||||
a.handleProjectReprovision(w, r, user, projectID)
|
||||
case "status":
|
||||
a.handleProjectStatus(w, r, user, projectID)
|
||||
case "logs":
|
||||
|
|
@ -145,6 +147,19 @@ func (a *App) handleProjectSubroutes(w http.ResponseWriter, r *http.Request, use
|
|||
}
|
||||
}
|
||||
|
||||
func (a *App) handleProjectReprovision(w http.ResponseWriter, r *http.Request, user User, projectID int64) {
|
||||
if r.Method != http.MethodPost {
|
||||
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
|
||||
return
|
||||
}
|
||||
p, err := a.reprovisionProject(r.Context(), user.Username, projectID)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
writeJSON(w, http.StatusOK, p)
|
||||
}
|
||||
|
||||
func (a *App) handleProjectEnv(w http.ResponseWriter, r *http.Request, user User, projectID int64) {
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue