fix(baidu_photo): legal album title check (close #4479 in #4487)

This commit is contained in:
foxxorcat
2023-05-27 17:07:57 +08:00
committed by GitHub
parent 2c1f70fbe9
commit ef68f84787
2 changed files with 2 additions and 18 deletions

View File

@ -4,7 +4,6 @@ import (
"fmt"
"math"
"math/rand"
"regexp"
"strings"
"time"
@ -16,11 +15,6 @@ func getTid() string {
return fmt.Sprintf("3%d%.0f", time.Now().Unix(), math.Floor(9000000*rand.Float64()+1000000))
}
// 检查名称
func checkName(name string) bool {
return len(name) <= 50 && regexp.MustCompile("[\u4e00-\u9fa5A-Za-z0-9_-]").MatchString(name)
}
func toTime(t int64) *time.Time {
tm := time.Unix(t, 0)
return &tm