Redirect to generated personal project slug
This commit is contained in:
		
							parent
							
								
									cb967b92fd
								
							
						
					
					
						commit
						73836c5e25
					
				|  | @ -284,6 +284,11 @@ func NewWebsiteRoutes(longRequestContext context.Context, conn *pgxpool.Pool, pe | |||
| 					return c.Redirect(hmnurl.BuildOfficialProjectHomepage(p.Project.Slug), http.StatusSeeOther) | ||||
| 				} | ||||
| 
 | ||||
| 				if c.PathParams["slug"] != models.GeneratePersonalProjectSlug(p.Project.Name) { | ||||
| 					// TODO: Redirect to the same page on the other path
 | ||||
| 					return c.Redirect(hmnurl.BuildPersonalProject(p.Project.ID, models.GeneratePersonalProjectSlug(p.Project.Name)), http.StatusSeeOther) | ||||
| 				} | ||||
| 
 | ||||
| 				c.CurrentProject = &p.Project | ||||
| 
 | ||||
| 				return h(c) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue