Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziedelth committed Oct 20, 2022
1 parent a9cd4a8 commit 25e4f56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/main/kotlin/fr/ziedelth/controllers/DeviceController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ package fr.ziedelth.controllers
import com.google.gson.Gson
import com.google.gson.JsonObject
import fr.ziedelth.entities.Device
import fr.ziedelth.entities.Manga
import fr.ziedelth.entities.device_redirections.DeviceEpisodeRedirection
import fr.ziedelth.entities.device_redirections.DeviceMangaRedirection
import fr.ziedelth.entities.isNullOrNotValid
import fr.ziedelth.utils.Database
import io.ktor.http.*
import io.ktor.server.application.*
import io.ktor.server.request.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ object DeviceRedirectionController : IController<Device>("/devices/redirection")
val session = Database.getSession()

try {
val query = session.createQuery("FROM DeviceEpisodeRedirection WHERE device = :device AND episode = :episode", DeviceEpisodeRedirection::class.java)
val query = session.createQuery(
"FROM DeviceEpisodeRedirection WHERE device = :device AND episode = :episode",
DeviceEpisodeRedirection::class.java
)
query.maxResults = 1
query.setParameter("device", device)
query.setParameter("episode", episode)
Expand Down Expand Up @@ -78,7 +81,10 @@ object DeviceRedirectionController : IController<Device>("/devices/redirection")
val session = Database.getSession()

try {
val query = session.createQuery("FROM DeviceMangaRedirection WHERE device = :device AND manga = :manga", DeviceMangaRedirection::class.java)
val query = session.createQuery(
"FROM DeviceMangaRedirection WHERE device = :device AND manga = :manga",
DeviceMangaRedirection::class.java
)
query.maxResults = 1
query.setParameter("device", device)
query.setParameter("manga", manga)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package fr.ziedelth.entities.device_redirections

import fr.ziedelth.entities.Device
import fr.ziedelth.entities.Episode
import fr.ziedelth.entities.Manga
import jakarta.persistence.*
import org.hibernate.Hibernate
Expand Down

0 comments on commit 25e4f56

Please sign in to comment.