mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 14:53:55 +08:00
Merge pull request #62 from yokowu/fix-extensions
fix(extensions): 修复插件内容下载地址
This commit is contained in:
@@ -38,5 +38,8 @@ func (e *ExtensionRepo) Save(ctx context.Context, ext *db.Extension) (*db.Extens
|
||||
}
|
||||
|
||||
func (e *ExtensionRepo) GetByVersion(ctx context.Context, version string) (*db.Extension, error) {
|
||||
if version == "" {
|
||||
return e.Latest(ctx)
|
||||
}
|
||||
return e.db.Extension.Query().Where(extension.Version(version)).Only(ctx)
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ func NewUserHandler(
|
||||
}
|
||||
|
||||
w.GET("/api/v1/static/vsix/:version", web.BaseHandler(u.VSIXDownload))
|
||||
w.GET("/api/v1/static/vsix", web.BaseHandler(u.VSIXDownload))
|
||||
w.POST("/api/v1/vscode/init-auth", web.BindHandler(u.VSCodeAuthInit))
|
||||
|
||||
// admin
|
||||
|
||||
Reference in New Issue
Block a user