Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mmvpm committed Apr 20, 2024
1 parent 87cc443 commit c74efa9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class OfferDaoPostgresql[F[_]: MonadCancelThrow](implicit val tr: Transactor[F])
.void
.leftMap {
case UnexpectedEnd => OfferNotFoundDaoError(offerId)
case error => InternalOfferDaoError(error.getMessage)
case error => InternalOfferDaoError(error.getMessage)
}

// internal
Expand Down Expand Up @@ -184,7 +184,7 @@ class OfferDaoPostgresql[F[_]: MonadCancelThrow](implicit val tr: Transactor[F])
sql"insert into photos values (${photo.id}, ${photo.url}, ${photo.blob})".update.run.map(_ == 1)

private def insertIntoOfferPhotos(offerId: OfferID, photoId: PhotoID): ConnectionIO[Boolean] =
sql"insert into offer_photos values ($photoId, $offerId)".update.run.map(_ == 1)
sql"insert into offer_photos values ($photoId, $offerId)".update.run.map(_ == 1)

private def deleteFromPhotos(offerId: OfferID): ConnectionIO[Int] =
sql"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ package com.github.mmvpm.service.service.offer
import cats.data.EitherT
import com.github.mmvpm.model.{OfferID, UserID}
import com.github.mmvpm.service.api.error.ApiError
import com.github.mmvpm.service.api.request.{AddOfferPhotosRequest, CreateOfferRequest, GetOffersRequest, UpdateOfferRequest}
import com.github.mmvpm.service.api.request.{
AddOfferPhotosRequest,
CreateOfferRequest,
GetOffersRequest,
UpdateOfferRequest
}
import com.github.mmvpm.service.api.response.{OfferResponse, OffersResponse, OkResponse}

trait OfferService[F[_]] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import cats.implicits.{toFunctorOps, toTraverseOps}
import cats.{Functor, Monad}
import com.github.mmvpm.model._
import com.github.mmvpm.service.api.error._
import com.github.mmvpm.service.api.request.{AddOfferPhotosRequest, CreateOfferRequest, GetOffersRequest, UpdateOfferRequest}
import com.github.mmvpm.service.api.request.{
AddOfferPhotosRequest,
CreateOfferRequest,
GetOffersRequest,
UpdateOfferRequest
}
import com.github.mmvpm.service.api.response.{OfferResponse, OffersResponse, OkResponse}
import com.github.mmvpm.service.dao.error._
import com.github.mmvpm.service.dao.offer.OfferDao
Expand Down

0 comments on commit c74efa9

Please sign in to comment.