mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-26 05:36:38 +00:00
return after redirects to web representation (#755)
This commit is contained in:
parent
ac6ed3d939
commit
586ebb5059
|
@ -48,6 +48,7 @@ func (m *Module) FollowersGETHandler(c *gin.Context) {
|
||||||
if format == string(api.TextHTML) {
|
if format == string(api.TextHTML) {
|
||||||
// redirect to the user's profile
|
// redirect to the user's profile
|
||||||
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, errWithCode := m.processor.GetFediFollowers(transferContext(c), requestedUsername, c.Request.URL)
|
resp, errWithCode := m.processor.GetFediFollowers(transferContext(c), requestedUsername, c.Request.URL)
|
||||||
|
|
|
@ -48,6 +48,7 @@ func (m *Module) FollowingGETHandler(c *gin.Context) {
|
||||||
if format == string(api.TextHTML) {
|
if format == string(api.TextHTML) {
|
||||||
// redirect to the user's profile
|
// redirect to the user's profile
|
||||||
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, errWithCode := m.processor.GetFediFollowing(transferContext(c), requestedUsername, c.Request.URL)
|
resp, errWithCode := m.processor.GetFediFollowing(transferContext(c), requestedUsername, c.Request.URL)
|
||||||
|
|
|
@ -99,6 +99,7 @@ func (m *Module) OutboxGETHandler(c *gin.Context) {
|
||||||
if format == string(api.TextHTML) {
|
if format == string(api.TextHTML) {
|
||||||
// redirect to the user's profile
|
// redirect to the user's profile
|
||||||
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var page bool
|
var page bool
|
||||||
|
|
|
@ -52,6 +52,7 @@ func (m *Module) PublicKeyGETHandler(c *gin.Context) {
|
||||||
if format == string(api.TextHTML) {
|
if format == string(api.TextHTML) {
|
||||||
// redirect to the user's profile
|
// redirect to the user's profile
|
||||||
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, errWithCode := m.processor.GetFediUser(transferContext(c), requestedUsername, c.Request.URL)
|
resp, errWithCode := m.processor.GetFediUser(transferContext(c), requestedUsername, c.Request.URL)
|
||||||
|
|
|
@ -113,6 +113,7 @@ func (m *Module) StatusRepliesGETHandler(c *gin.Context) {
|
||||||
if format == string(api.TextHTML) {
|
if format == string(api.TextHTML) {
|
||||||
// redirect to the status
|
// redirect to the status
|
||||||
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername+"/statuses/"+requestedStatusID)
|
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername+"/statuses/"+requestedStatusID)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var page bool
|
var page bool
|
||||||
|
|
|
@ -56,6 +56,7 @@ func (m *Module) StatusGETHandler(c *gin.Context) {
|
||||||
if format == string(api.TextHTML) {
|
if format == string(api.TextHTML) {
|
||||||
// redirect to the status
|
// redirect to the status
|
||||||
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername+"/statuses/"+requestedStatusID)
|
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername+"/statuses/"+requestedStatusID)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, errWithCode := m.processor.GetFediStatus(transferContext(c), requestedUsername, requestedStatusID, c.Request.URL)
|
resp, errWithCode := m.processor.GetFediStatus(transferContext(c), requestedUsername, requestedStatusID, c.Request.URL)
|
||||||
|
|
|
@ -56,6 +56,7 @@ func (m *Module) UsersGETHandler(c *gin.Context) {
|
||||||
if format == string(api.TextHTML) {
|
if format == string(api.TextHTML) {
|
||||||
// redirect to the user's profile
|
// redirect to the user's profile
|
||||||
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, errWithCode := m.processor.GetFediUser(transferContext(c), requestedUsername, c.Request.URL)
|
resp, errWithCode := m.processor.GetFediUser(transferContext(c), requestedUsername, c.Request.URL)
|
||||||
|
|
Loading…
Reference in a new issue