GetMissingModels returns the list of model names that are referenced by channels but do not have corresponding records in the models meta table. This helps administrators quickly discover models that need configuration.
(c *gin.Context)
| 12 | // but do not have corresponding records in the models meta table. |
| 13 | // This helps administrators quickly discover models that need configuration. |
| 14 | func GetMissingModels(c *gin.Context) { |
| 15 | missing, err := model.GetMissingModels() |
| 16 | if err != nil { |
| 17 | c.JSON(http.StatusOK, gin.H{ |
| 18 | "success": false, |
| 19 | "message": err.Error(), |
| 20 | }) |
| 21 | return |
| 22 | } |
| 23 | |
| 24 | c.JSON(http.StatusOK, gin.H{ |
| 25 | "success": true, |
| 26 | "data": missing, |
| 27 | }) |
| 28 | } |
nothing calls this directly
no test coverage detected