fix redirect after sending the peer email

This commit is contained in:
Christoph Haas 2021-03-22 13:45:35 +01:00
parent 1e9f845457
commit 68507c3bcd
1 changed files with 5 additions and 1 deletions

View File

@ -301,8 +301,12 @@ func (s *Server) GetPeerConfigMail(c *gin.Context) {
}
SetFlashMessage(c, "mail sent successfully", "success")
if strings.HasPrefix(c.Request.URL.Path, "/user") {
c.Redirect(http.StatusSeeOther, "/user/profile")
} else {
c.Redirect(http.StatusSeeOther, "/admin")
}
}
func (s *Server) GetPeerStatus(c *gin.Context) {
peer := s.peers.GetPeerByKey(c.Query("pkey"))