Merge pull request #62 from yokowu/fix-extensions

fix(extensions): 修复插件内容下载地址
This commit is contained in:
Yoko
2025-07-09 10:44:00 +08:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@@ -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)
}

View File

@@ -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