Add review workflows, tree-shaped workflows and a workflow editor

This commit is contained in:
Ian Gulliver
2026-10-20 18:52:04 -07:00
parent 9869fad988
commit f2188c53eb
31 changed files with 2179 additions and 863 deletions
-19
View File
@@ -54,22 +54,3 @@ func (s *Server) UpdateAway(w http.ResponseWriter, r *http.Request) {
}
writeJSON(w, http.StatusOK, u)
}
func (s *Server) UpdateReviewModels(w http.ResponseWriter, r *http.Request) {
req := api.ReviewModels{}
if !readJSON(w, r, &req) {
return
}
if strings.TrimSpace(req.ReviewModel) == "" || strings.TrimSpace(req.SecondReviewModel) == "" {
writeError(w, http.StatusBadRequest, errors.New("review_model and second_review_model are required"))
return
}
u, err := s.store.UpdateReviewModels(r.Context(), actor(r), req.ReviewModel, req.SecondReviewModel)
if err != nil {
writeStoreError(w, err)
return
}
writeJSON(w, http.StatusOK, u)
}