Commit fe9cf41a authored by Janne Koschinski's avatar Janne Koschinski

Added debug info

parent 291db9db
......@@ -19,6 +19,9 @@ func pageImageDetail(ctx PageContext) http.Handler {
user := parseUser(r)
_, imageId := path.Split(r.URL.Path)
fmt.Printf("image: %s, path: %s, user: %v", imageId, r.URL.Path, user)
result, err := ctx.Database.Query(`
SELECT
id,
......@@ -36,6 +39,7 @@ func pageImageDetail(ctx PageContext) http.Handler {
}
var info Image
if result.Next() {
var owner string
err := result.Scan(&info.Id, &owner, &info.Title, &info.Description, &info.CreatedAt, &info.OriginalName, &info.MimeType)
......@@ -43,6 +47,8 @@ func pageImageDetail(ctx PageContext) http.Handler {
panic(err)
}
fmt.Printf("info: %v", info)
switch r.PostFormValue("action") {
case "update":
_, err = ctx.Database.Exec(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment