文档下载文案提示

dev
truthhun 1 year ago
parent aa13c1f340
commit 47d9d56b27

3
.gitignore vendored

@ -13,4 +13,5 @@ watch.bat
indexes
sitemap
!util/sitemap
license.cert
license.cert
*.cert

@ -608,9 +608,8 @@ func (s *DocumentAPIService) SearchDocument(ctx context.Context, req *pb.SearchD
func (s *DocumentAPIService) DownloadDocument(ctx context.Context, req *pb.Document) (res *pb.DownloadDocumentReply, err error) {
cfg := s.dbModel.GetConfigOfDownload()
userClaims, err := s.checkLogin(ctx)
if err != nil && !cfg.EnableGuestDownload {
// 未登录且不允许游客下载
return res, status.Errorf(codes.Unauthenticated, err.Error())
if err != nil && !cfg.EnableGuestDownload { // 未登录且不允许游客下载
return res, err
}
var userId int64

Loading…
Cancel
Save