Update admin feedback visitation links
This commit is contained in:
parent
384638de09
commit
7555dee944
|
@ -7,7 +7,6 @@ import (
|
||||||
|
|
||||||
"code.nonshy.com/nonshy/website/pkg/config"
|
"code.nonshy.com/nonshy/website/pkg/config"
|
||||||
"code.nonshy.com/nonshy/website/pkg/models"
|
"code.nonshy.com/nonshy/website/pkg/models"
|
||||||
"code.nonshy.com/nonshy/website/pkg/photo"
|
|
||||||
"code.nonshy.com/nonshy/website/pkg/session"
|
"code.nonshy.com/nonshy/website/pkg/session"
|
||||||
"code.nonshy.com/nonshy/website/pkg/templates"
|
"code.nonshy.com/nonshy/website/pkg/templates"
|
||||||
)
|
)
|
||||||
|
@ -51,7 +50,12 @@ func Feedback() http.HandlerFunc {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
session.FlashError(w, r, "Couldn't visit user %d: %s", fb.TableID, err)
|
session.FlashError(w, r, "Couldn't visit user %d: %s", fb.TableID, err)
|
||||||
} else {
|
} else {
|
||||||
templates.Redirect(w, "/u/"+user.Username)
|
// If this is an "inner circle removal" report, go to their gallery and filter pics by Public.
|
||||||
|
if fb.Intent == "report.circle" {
|
||||||
|
templates.Redirect(w, "/photo/u/"+user.Username+"?visibility=public")
|
||||||
|
} else {
|
||||||
|
templates.Redirect(w, "/u/"+user.Username)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case "photos":
|
case "photos":
|
||||||
|
@ -71,7 +75,7 @@ func Feedback() http.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Direct link to the photo.
|
// Direct link to the photo.
|
||||||
templates.Redirect(w, photo.URLPath(pic.Filename))
|
templates.Redirect(w, fmt.Sprintf("/photo/view?id=%d", fb.TableID))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case "messages":
|
case "messages":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user