部署脚本
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ attack:
|
||||
windowDurationSeconds: 60
|
||||
pprof: false
|
||||
host: "172.104.166.87"
|
||||
listenAddr: "20002"
|
||||
listenAddr: "20102"
|
||||
origDomain: "https://yuan.bbaazz.me/"
|
||||
trustedProxies: ""
|
||||
bucketVideoAddressV2: "http://139.162.27.29:19996"
|
||||
|
||||
@@ -1276,7 +1276,7 @@ func ensureImportedPlayletSlug(ctx context.Context, playlet *playletmod.Playlet)
|
||||
if playlet == nil {
|
||||
return srvdef.New(srvdef.ErrParamError, "短剧数据为空", "")
|
||||
}
|
||||
playlet.Slug = utils.MakeRandomSlug(func(slug string) bool {
|
||||
playlet.Slug = utils.MakeAbbrSlug(playlet.Title, func(slug string) bool {
|
||||
exist, _ := playletmod.FindOnePlaylet(ctx, bson.M{
|
||||
playletmod.FN.Playlet.Slug: slug,
|
||||
})
|
||||
|
||||
@@ -176,7 +176,7 @@ func ensurePlayletSlug(ctx context.Context, ac *playletmod.Playlet, excludeId in
|
||||
}
|
||||
return nil
|
||||
}
|
||||
ac.Slug = utils.MakeRandomSlug(func(slug string) bool {
|
||||
ac.Slug = utils.MakeAbbrSlug(ac.Title, func(slug string) bool {
|
||||
filter := bson.M{playletmod.FN.Playlet.Slug: slug}
|
||||
if excludeId > 0 {
|
||||
filter[playletmod.FN.Playlet.Id] = bson.M{"$ne": excludeId}
|
||||
@@ -208,7 +208,11 @@ func preparePlayletSlugOnUpdate(ctx context.Context, id int64, info *playletmod.
|
||||
}
|
||||
return nil
|
||||
}
|
||||
newSlug := utils.MakeRandomSlug(func(s string) bool {
|
||||
title := info.Title
|
||||
if req.Title != nil {
|
||||
title = strings.TrimSpace(*req.Title)
|
||||
}
|
||||
newSlug := utils.MakeAbbrSlug(title, func(s string) bool {
|
||||
exist, _ := playletmod.FindOnePlaylet(ctx, bson.M{
|
||||
playletmod.FN.Playlet.Slug: s,
|
||||
playletmod.FN.Playlet.Id: bson.M{"$ne": id},
|
||||
|
||||
Reference in New Issue
Block a user