~jan0sch/smederee
Showing details for patch 942eecead99c935f83af6be1d8c57ebefa3f0471.
diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala 2025-01-16 10:05:51.474121970 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala 2025-01-16 10:05:51.474121970 +0000 @@ -955,7 +955,7 @@ } } - private val parseCreateRepositoryForm: AuthedRoutes[Account, F] = AuthedRoutes.of { + private val createRepository: AuthedRoutes[Account, F] = AuthedRoutes.of { case ar @ POST -> Root / "repo" / "create" as user => ar.req.decodeStrict[F, UrlForm] { urlForm => val response = for { @@ -1063,7 +1063,7 @@ } } - private val parseDeleteRepositoryForm: AuthedRoutes[Account, F] = AuthedRoutes.of { + private val deleteRepository: AuthedRoutes[Account, F] = AuthedRoutes.of { case ar @ POST -> Root / UsernamePathParameter(repositoryOwnerName) / VcsRepositoryNamePathParameter( repositoryName ) / "delete" as user => @@ -1100,7 +1100,7 @@ } } - private val parseEditRepositoryForm: AuthedRoutes[Account, F] = AuthedRoutes.of { + private val editRepository: AuthedRoutes[Account, F] = AuthedRoutes.of { case ar @ POST -> Root / UsernamePathParameter(repositoryOwnerName) / VcsRepositoryNamePathParameter( repositoryName ) / "edit" as user => @@ -1458,7 +1458,7 @@ val protectedRoutes = downloadDistribution <+> forkRepository <+> showAllRepositories <+> showRepositories <+> - parseCreateRepositoryForm <+> parseDeleteRepositoryForm <+> parseEditRepositoryForm <+> + createRepository <+> deleteRepository <+> editRepository <+> showCreateRepositoryForm <+> showDeleteRepositoryForm <+> showEditRepositoryForm <+> showRepositoryOverview <+> showRepositoryBranches <+> showRepositoryHistory <+> showRepositoryPatchDetails <+> showRepositoryFiles