+
+// updateProject Update some field of a specific project
+func (s *APIService) updateProject(c *gin.Context) {
+ id, err := s.projects.ResolveID(c.Param("id"))
+ if err != nil {
+ common.APIError(c, err.Error())
+ return
+ }
+
+ var cfgArg xaapiv1.ProjectConfig
+ if c.BindJSON(&cfgArg) != nil {
+ common.APIError(c, "Invalid arguments")
+ return
+ }
+
+ s.Log.Debugln("Update project id ", id)
+
+ upPrj, err := s.projects.Update(id, cfgArg, s.sessions.GetID(c))
+ if err != nil {
+ common.APIError(c, err.Error())
+ return
+ }
+ c.JSON(http.StatusOK, upPrj)
+}