mirror of
https://github.com/documize/community.git
synced 2025-07-21 14:19:43 +02:00
refactored unique ID generator package
This commit is contained in:
parent
cf58f8164d
commit
fe05cf7bb5
16 changed files with 69 additions and 64 deletions
|
@ -23,6 +23,7 @@ import (
|
|||
"github.com/documize/community/core/api/request"
|
||||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/log"
|
||||
"github.com/documize/community/core/uniqueid"
|
||||
)
|
||||
|
||||
// GetLinkCandidates returns references to documents/sections/attachments.
|
||||
|
@ -70,7 +71,7 @@ func GetLinkCandidates(w http.ResponseWriter, r *http.Request) {
|
|||
for _, p := range pages {
|
||||
if p.RefID != pageID {
|
||||
c := entity.LinkCandidate{
|
||||
RefID: util.UniqueID(),
|
||||
RefID: uniqueid.Generate(),
|
||||
FolderID: folderID,
|
||||
DocumentID: documentID,
|
||||
TargetID: p.RefID,
|
||||
|
@ -98,7 +99,7 @@ func GetLinkCandidates(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
for _, f := range files {
|
||||
c := entity.LinkCandidate{
|
||||
RefID: util.UniqueID(),
|
||||
RefID: uniqueid.Generate(),
|
||||
FolderID: folderID,
|
||||
DocumentID: documentID,
|
||||
TargetID: f.RefID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue