rpdata-wikifileimport: Fixed it to use new models module.
the build was successful

This commit is contained in:
2018-10-27 10:15:23 +02:00
parent 4979b02104
commit b414cf118f
+3 -3
View File
@@ -9,7 +9,7 @@ import (
"git.aiterp.net/rpdata/api/internal/config"
"git.aiterp.net/rpdata/api/internal/store"
"git.aiterp.net/rpdata/api/model/file"
"git.aiterp.net/rpdata/api/models/files"
)
func main() {
@@ -33,7 +33,7 @@ func main() {
store.Init()
for _, info := range data.Query.Allimages {
existing, err := file.FindName("wiki", info.Name, info.User)
existing, err := files.FindName("wiki", info.Name, info.User)
if err == nil && existing.ID != "" {
log.Println("Skipping", info.Name, "because it already exists")
continue
@@ -45,7 +45,7 @@ func main() {
continue
}
file, err := file.Insert(info.Name, "wiki", info.Mime, info.User, ts, info.Size, info.URL)
file, err := files.Insert(info.Name, "wiki", info.Mime, info.User, ts, info.Size, info.URL)
if err != nil {
log.Println("Skipping", info.Name, "error:", err)
continue