This commit is contained in:
lwl0608 2024-12-19 18:57:04 +08:00
commit 6af9eed12b
2 changed files with 16 additions and 1 deletions

View File

@ -352,7 +352,7 @@ func Init(r *gin.Engine) {
apiShareGroup.POST("zone_url", GetZoneShareUrl)
apiConfigGroup := r.Group("/api/config", PrepareToC())
apiConfigGroup.POST("cold_config", middleware.JSONParamValidator(base.BaseRequest{}), middleware.JwtAuthenticator(), ColdConfigHandler)
apiConfigGroup.POST("cold_config", middleware.JSONParamValidator(base.BaseRequest{}), ColdConfigHandler)
apiPreviewsGroup := r.Group("/api/previews", PrepareToC())
apiPreviewsGroup.POST("original_image", middleware.JSONParamValidator(imageproto.ApiOriginalImageReq{}), middleware.JwtAuthenticator(), ApiGetOriginalImage)

View File

@ -8,6 +8,7 @@ import (
"service/bizcommon/util"
"service/library/logger"
"service/library/mediafiller"
"strings"
"github.com/gin-gonic/gin"
)
@ -158,6 +159,20 @@ func ApiGetZoneMomentListByZid(ctx *gin.Context) {
mediafiller.FillList(ctx, mediaFillableList)
service.DefaultService.UtilEncryptVideosForZoneMomentVOs(ctx, list)
if *req.Zid == 1 {
for _, vo := range list {
for _, mc := range vo.MediaComp.Images {
oldUrl := ""
oldUrls := mc.Urls
if len(oldUrls) >= 0 {
oldUrl = oldUrls[0]
}
newUrl := strings.ReplaceAll(oldUrl, "https://filecdntx01.tiefen.fun/", "https://levianderwinv01.tiefen.space/")
mc.Urls = []string{newUrl}
}
}
}
data := &zonemomentproto.ApiListByZidData{
List: list,
Offset: req.Offset + len(list),