Add Away mode and an agent fork tool
This commit is contained in:
@@ -41,6 +41,20 @@ func (s *Server) UpdateDefaultModel(w http.ResponseWriter, r *http.Request) {
|
||||
writeJSON(w, http.StatusOK, u)
|
||||
}
|
||||
|
||||
func (s *Server) UpdateAway(w http.ResponseWriter, r *http.Request) {
|
||||
req := api.Away{}
|
||||
if !readJSON(w, r, &req) {
|
||||
return
|
||||
}
|
||||
|
||||
u, err := s.agents.SetAway(r.Context(), actor(r), req.Away)
|
||||
if err != nil {
|
||||
writeAgentError(w, err)
|
||||
return
|
||||
}
|
||||
writeJSON(w, http.StatusOK, u)
|
||||
}
|
||||
|
||||
func (s *Server) UpdateReviewModels(w http.ResponseWriter, r *http.Request) {
|
||||
req := api.ReviewModels{}
|
||||
if !readJSON(w, r, &req) {
|
||||
|
||||
Reference in New Issue
Block a user