mirror of
https://github.com/miniflux/v2.git
synced 2025-07-22 17:18:37 +00:00
Remove github.com/google/uuid
Replace it with a hand-rolled implementation. Heck, an UUID isn't even a requirement, according to [omnivore](https://docs.omnivore.app/integrations/api.html#saving-a-url-with-the-api)'s documentation, any "unique id" would do.
This commit is contained in:
parent
06e256e5ef
commit
bce21a9f91
3 changed files with 8 additions and 4 deletions
|
@ -55,3 +55,8 @@ func GenerateSHA256Hmac(secret string, data []byte) string {
|
|||
h.Write(data)
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
func GenerateUUID() string {
|
||||
b := GenerateRandomBytes(16)
|
||||
return fmt.Sprintf("%X-%X-%X-%X-%X", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
|
||||
}
|
||||
|
|
|
@ -11,8 +11,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"miniflux.app/v2/internal/crypto"
|
||||
"miniflux.app/v2/internal/version"
|
||||
)
|
||||
|
||||
|
@ -79,7 +78,7 @@ func (c *client) SaveUrl(url string) error {
|
|||
"query": mutation,
|
||||
"variables": map[string]interface{}{
|
||||
"input": map[string]interface{}{
|
||||
"clientRequestId": uuid.New().String(),
|
||||
"clientRequestId": crypto.GenerateUUID(),
|
||||
"source": "api",
|
||||
"url": url,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue