mirror of https://github.com/Xhofe/alist
chore: add uuid to token
parent
6ebb36b2eb
commit
b1d563c874
|
@ -1,6 +1,7 @@
|
||||||
package random
|
package random
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/google/uuid"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -18,7 +19,7 @@ func String(n int) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Token() string {
|
func Token() string {
|
||||||
return String(64)
|
return uuid.NewString() + String(64)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
Loading…
Reference in New Issue