Skip to content

Commit

Permalink
db: use orm struct insertion for files too
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Oct 17, 2020
1 parent b5252be commit 48adaee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/db/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ func CreateFile(rt, pt string, sz, mt int64, h1, h2, h3, h4, h5, h6 string) {
defer dbstorage.InsertsLock.Unlock()
//
id := FS.QueryNextID(ctFile)
FS.Build().Ins(ctFile, id, rt, pt, sz, mt, h1, h2, h3, h4, h5, h6).Exe()
rv := &File{id, rt, pt, "", sz, "", mt, "", h1, h2, h3, h4, h5, h6}
FS.Build().InsI(ctFile, rv).Exe()
}

func DropFilesFromRoot(rt string) {
Expand Down

0 comments on commit 48adaee

Please sign in to comment.