Skip to content

Commit

Permalink
feat: plugin install
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Sep 9, 2024
1 parent d987e96 commit 50b7c6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions internal/server/controllers/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ func GetAsset(c *gin.Context) {

c.Data(http.StatusOK, "application/octet-stream", asset)
}

func InstallPlugin(c *gin.Context) {
}

func UninstallPlugin(c *gin.Context) {
}

func ListPlugins(c *gin.Context) {
}
2 changes: 1 addition & 1 deletion internal/server/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (app *App) RedirectPluginInvoke() gin.HandlerFunc {

func (app *App) redirectPluginInvokeByPluginID(ctx *gin.Context, plugin_id plugin_entities.PluginUniqueIdentifier) {
// try find the correct node
nodes, err := app.cluster.FetchPluginAvailableNodesById(plugin_id.PluginID())
nodes, err := app.cluster.FetchPluginAvailableNodesById(plugin_id.String())
if err != nil {
ctx.AbortWithStatusJSON(500, gin.H{"error": "Internal server error"})
log.Error("fetch plugin available nodes failed: %s", err.Error())
Expand Down

0 comments on commit 50b7c6d

Please sign in to comment.