~jan0sch/smederee

Showing details for patch 6706d62ad7b533004075cbfae83221484ecdc4be.
2023-02-13 (Mon), 1:33 PM - Jens Grassel - 6706d62ad7b533004075cbfae83221484ecdc4be

Labels: Refactoring: Fix typo in function name.

Summary of changes
4 files modified with 5 lines added and 5 lines removed
  • modules/hub/src/it/scala/de/smederee/tickets/DoobieLabelRepositoryTest.scala with 1 added and 1 removed lines
  • modules/hub/src/main/scala/de/smederee/tickets/DoobieLabelRepository.scala with 1 added and 1 removed lines
  • modules/hub/src/main/scala/de/smederee/tickets/LabelRepository.scala with 1 added and 1 removed lines
  • modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala with 2 added and 2 removed lines
diff -rN -u old-smederee/modules/hub/src/it/scala/de/smederee/tickets/DoobieLabelRepositoryTest.scala new-smederee/modules/hub/src/it/scala/de/smederee/tickets/DoobieLabelRepositoryTest.scala
--- old-smederee/modules/hub/src/it/scala/de/smederee/tickets/DoobieLabelRepositoryTest.scala	2025-01-31 20:02:50.250248230 +0000
+++ new-smederee/modules/hub/src/it/scala/de/smederee/tickets/DoobieLabelRepositoryTest.scala	2025-01-31 20:02:50.250248230 +0000
@@ -104,7 +104,7 @@
           }
           foundLabels <- repoId match {
             case None         => IO.pure(List.empty)
-            case Some(repoId) => labelRepo.allLables(repoId).compile.toList
+            case Some(repoId) => labelRepo.allLabels(repoId).compile.toList
           }
         } yield foundLabels
         test.map { foundLabels =>
diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/tickets/DoobieLabelRepository.scala new-smederee/modules/hub/src/main/scala/de/smederee/tickets/DoobieLabelRepository.scala
--- old-smederee/modules/hub/src/main/scala/de/smederee/tickets/DoobieLabelRepository.scala	2025-01-31 20:02:50.250248230 +0000
+++ new-smederee/modules/hub/src/main/scala/de/smederee/tickets/DoobieLabelRepository.scala	2025-01-31 20:02:50.250248230 +0000
@@ -31,7 +31,7 @@
   given Meta[LabelId]          = Meta[Long].timap(LabelId.apply)(_.toLong)
   given Meta[LabelName]        = Meta[String].timap(LabelName.apply)(_.toString)
 
-  override def allLables(vcsRepositoryId: Long): Stream[F, Label] =
+  override def allLabels(vcsRepositoryId: Long): Stream[F, Label] =
     sql"""SELECT id, name, description, colour FROM "labels" WHERE repository = $vcsRepositoryId ORDER BY name ASC"""
       .query[Label]
       .stream
diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRepository.scala new-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRepository.scala
--- old-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRepository.scala	2025-01-31 20:02:50.250248230 +0000
+++ new-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRepository.scala	2025-01-31 20:02:50.250248230 +0000
@@ -33,7 +33,7 @@
     * @return
     *   A stream of labels associated with the vcs repository which may be empty.
     */
-  def allLables(vcsRepositoryId: Long): Stream[F, Label]
+  def allLabels(vcsRepositoryId: Long): Stream[F, Label]
 
   /** Create a database entry for the given label definition.
     *
diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala
--- old-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala	2025-01-31 20:02:50.250248230 +0000
+++ new-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala	2025-01-31 20:02:50.250248230 +0000
@@ -75,7 +75,7 @@
       resp <- repoAndId match {
         case Some((repo, repoId)) =>
           for {
-            labels <- labelRepo.allLables(repoId).compile.toList
+            labels <- labelRepo.allLabels(repoId).compile.toList
             repositoryBaseUri <- Sync[F].delay(
               linkConfig.createFullUri(
                 Uri(path =
@@ -160,7 +160,7 @@
                   }
                 }
                 form   <- Sync[F].delay(LabelForm.validate(formData))
-                labels <- repoAndId.traverse(tuple => labelRepo.allLables(tuple._2).compile.toList)
+                labels <- repoAndId.traverse(tuple => labelRepo.allLabels(tuple._2).compile.toList)
                 repositoryBaseUri <- Sync[F].delay(
                   linkConfig.createFullUri(
                     Uri(path =