Skip to content

Commit

Permalink
Revert "!NEEDS TO BE REVERTED! Add redirect to homepage (#684)"
Browse files Browse the repository at this point in the history
This reverts commit ea38704.
  • Loading branch information
felixoi committed Oct 10, 2018
1 parent 1767ebf commit 85f43ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions app/controllers/project/Projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import db.{ModelService, ObjectReference}
import discourse.OreDiscourseApi
import form.OreForms
import form.project.{DiscussionReplyForm, FlagForm, ProjectRoleSetBuilder}
import models.project.{Note, Page, Visibility}
import models.project.{Note, Visibility}
import models.user._
import models.viewhelper.ScopedOrganizationData
import ore.permission._
Expand Down Expand Up @@ -226,7 +226,12 @@ class Projects @Inject()(stats: StatTracker, forms: OreForms, factory: ProjectFa
* @return View of project
*/
def show(author: String, slug: String): Action[AnyContent] = ProjectAction(author, slug).async { implicit request =>
Future.successful(Redirect(routes.Pages.show(author, slug, Page.homeName)))
projects.queryProjectPages(request.project).flatMap { pages =>
val pageCount = pages.size + pages.map(_._2.size).sum
this.stats.projectViewed(
Ok(views.pages.view(request.data, request.scoped, pages, request.project.homePage, None, pageCount))
)
}
}

/**
Expand Down
1 change: 0 additions & 1 deletion app/controllers/project/Versions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ class Versions @Inject()(stats: StatTracker, forms: OreForms, factory: ProjectFa
// Found a pending project, create it with first version
pendingProject.complete
.flatTap { created =>
created._1.homePage
UserActionLogger.log(request, LoggedAction.ProjectCreated, created._1.id.value, "created", "null")
}
.flatTap(created => addUnstableTag(created._2, versionData.unstable))
Expand Down

0 comments on commit 85f43ca

Please sign in to comment.