Skip to content
Snippets Groups Projects
Verified Commit fe9cf41a authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Added debug info

parent 291db9db
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment