1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

link persistence

This commit is contained in:
Harvey Kandola 2016-10-25 15:56:08 -07:00
parent 4a17acce11
commit c27de6bcab
11 changed files with 160 additions and 104 deletions

View file

@ -69,7 +69,7 @@ func GetLinkCandidates(w http.ResponseWriter, r *http.Request) {
c := entity.LinkCandidate{
RefID: util.UniqueID(),
DocumentID: documentID,
PageID: p.RefID,
TargetID: p.RefID,
LinkType: "section",
Title: p.Title,
}
@ -94,12 +94,12 @@ func GetLinkCandidates(w http.ResponseWriter, r *http.Request) {
for _, f := range files {
c := entity.LinkCandidate{
RefID: util.UniqueID(),
DocumentID: documentID,
AttachmentID: f.RefID,
LinkType: "file",
Title: f.Filename,
AttachmentExtension: f.Extension,
RefID: util.UniqueID(),
DocumentID: documentID,
TargetID: f.RefID,
LinkType: "file",
Title: f.Filename,
Context: f.Extension,
}
fc = append(fc, c)