浏览代码

feat: support enabled endpoint

Yeuoly 10 月之前
父节点
当前提交
2e2dbe7797
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      internal/service/endpoint.go

+ 5 - 0
internal/service/endpoint.go

@@ -29,6 +29,11 @@ func Endpoint(
 	plugin_installation *models.PluginInstallation,
 	path string,
 ) {
+	if !endpoint.Enabled {
+		ctx.JSON(404, gin.H{"error": "plugin not found"})
+		return
+	}
+
 	req := ctx.Request.Clone(context.Background())
 	req.URL.Path = path