kumfo commented on issue #189:
URL: 
https://github.com/apache/incubator-answer-plugins/issues/189#issuecomment-2261964079

   Sorry, this is a bug.
    
   When defining the Embed plugin, the data structure is consistent with the 
Basic plugin, resulting in other installed plugins being recognized as the 
Embed plugin.
    
   I will make corrections in the next version.
    
   If you need to use it urgently and install it from source code, you can 
temporarily manually make changes to the source code before compiling and 
installing it.
    
   Change the code location:
   
   [Code 
Line](https://github.com/apache/incubator-answer/blob/4692420e5ff366f7d7e0d5d14a2afab1527cbd0b/internal/controller/embed_controller.go#L44)
   
   The code changed:
   ```go
   func (c *EmbedController) GetEmbedConfig(ctx *gin.Context) {
        resp := make([]*schema.GetEmbedOptionResp, 0)
   
        _ = plugin.CallConfig(func(fn plugin.Config) error {
                if fn.Info().SlugName == "basic_embed" {
                        for _, field := range fn.ConfigFields() {
                                resp = append(resp, &schema.GetEmbedOptionResp{
                                        Platform: field.Name,
                                        Enable:   field.Value.(bool),
                                })
                        }
                        return nil
                }
                return nil
        })
        handler.HandleResponse(ctx, nil, resp)
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to