Skip to content
Permalink
Browse files

Fix missing imports

  • Loading branch information
mangelajo committed Dec 29, 2019
1 parent 2469ec0 commit 6ee81caea4649d3fc3bb6b5bde0628cb91c8e6f5
Showing with 5 additions and 2 deletions.
  1. +2 −2 system/admin/upload/upload.go
  2. +3 −0 system/db/init.go
@@ -14,6 +14,8 @@ import (
"strconv"
"time"

"github.com/ponzu-cms/ponzu/system/cfg"

"github.com/ponzu-cms/ponzu/system/db"
"github.com/ponzu-cms/ponzu/system/item"
)
@@ -41,7 +43,6 @@ func StoreFiles(req *http.Request) (map[string]string, error) {
req.Form.Set("timestamp", ts)

// get or create upload directory to save files from request

i, err := strconv.ParseInt(ts, 10, 64)
if err != nil {
return nil, err
@@ -51,7 +52,6 @@ func StoreFiles(req *http.Request) (map[string]string, error) {

urlPathPrefix := "api"
uploadDirName := "uploads"

uploadDir := filepath.Join(cfg.UploadDir(), fmt.Sprintf("%d", tm.Year()), fmt.Sprintf("%02d", tm.Month()))
err = os.MkdirAll(uploadDir, os.ModeDir|os.ModePerm)
if err != nil {
@@ -5,6 +5,9 @@ package db

import (
"log"
"path/filepath"

"github.com/ponzu-cms/ponzu/system/cfg"

"github.com/ponzu-cms/ponzu/system/item"
"github.com/ponzu-cms/ponzu/system/search"

0 comments on commit 6ee81ca

Please sign in to comment.
You can’t perform that action at this time.