-
-
+
{{end}}
diff --git a/views/groups.go b/views/groups.go
index ee2896d..ce1d7db 100644
--- a/views/groups.go
+++ b/views/groups.go
@@ -1,6 +1,7 @@
package views
import (
+ "fmt"
"github.com/gin-gonic/gin"
"github.com/ordinary-dev/phoenix/database"
"gorm.io/gorm"
@@ -20,7 +21,7 @@ func CreateGroup(db *gorm.DB) gin.HandlerFunc {
}
// This page is called from the settings, return the user back.
- ctx.Redirect(http.StatusFound, "/settings")
+ ctx.Redirect(http.StatusFound, fmt.Sprintf("/settings#group-%v", group.ID))
}
}
@@ -45,7 +46,7 @@ func UpdateGroup(db *gorm.DB) gin.HandlerFunc {
}
// This page is called from the settings, return the user back.
- ctx.Redirect(http.StatusFound, "/settings")
+ ctx.Redirect(http.StatusFound, fmt.Sprintf("/settings#group-%v", group.ID))
}
}
diff --git a/views/links.go b/views/links.go
index 8b7fd68..bba20d7 100644
--- a/views/links.go
+++ b/views/links.go
@@ -1,6 +1,7 @@
package views
import (
+ "fmt"
"github.com/gin-gonic/gin"
"github.com/ordinary-dev/phoenix/database"
"gorm.io/gorm"
@@ -33,7 +34,7 @@ func CreateLink(db *gorm.DB) gin.HandlerFunc {
}
// Redirect to settings.
- ctx.Redirect(http.StatusFound, "/settings")
+ ctx.Redirect(http.StatusFound, fmt.Sprintf("/settings#link-%v", link.ID))
}
}
@@ -65,7 +66,7 @@ func UpdateLink(db *gorm.DB) gin.HandlerFunc {
}
// Redirect to settings.
- ctx.Redirect(http.StatusFound, "/settings")
+ ctx.Redirect(http.StatusFound, fmt.Sprintf("/settings#link-%v", link.ID))
}
}