Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
powercasgamer committed Nov 11, 2023
1 parent 249bd79 commit ec9e1c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
7 changes: 5 additions & 2 deletions app/src/main/kotlin/dev/mizule/imagery/app/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ import org.spongepowered.configurate.jackson.JacksonConfigurationLoader
import org.spongepowered.configurate.kotlin.objectMapperFactory
import java.nio.file.Path
import java.util.concurrent.TimeUnit
import kotlin.io.path.*
import kotlin.io.path.Path
import kotlin.io.path.createDirectories
import kotlin.io.path.inputStream
import kotlin.io.path.outputStream

private val logger = KotlinLogging.logger {}

Expand Down Expand Up @@ -100,7 +103,7 @@ class App(private val config: Config) {
System.currentTimeMillis(),
file.filename(),
file.extension(),
MimeTypes.getDefaultMimeByExtension(file.extension())
MimeTypes.getDefaultMimeByExtension(file.extension()),
)

dataNode.node(uploadedFile.id).set(uploadedFile)
Expand Down
7 changes: 1 addition & 6 deletions app/src/main/kotlin/dev/mizule/imagery/app/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,12 @@ data class Config(
@Comment("The port to start the application on.")
val port: Int = 8052,

<<<<<<< HEAD
@Comment("The base URL that this will be on, without trailing slashes.")
val baseUrl: String = "https://i.mizule.dev",

@Comment("The path to the file upload index.")
val indexPath: String = "./files.json",

@Comment("The path to the uploaded file storage directory.")
val storagePath: String = "./storage"
=======
@Comment("The domain that this will be on")
val domain: String = "https://example.com",
>>>>>>> 2e25971 (chore(spotless): use ktlint)
val storagePath: String = "./storage",
)
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ fun main(args: Array<String>) {

parser.parse(args)

<<<<<<< HEAD
val configPath = Path(path)
val configLoader = HoconConfigurationLoader.builder()
.path(configPath)
Expand All @@ -70,11 +69,4 @@ fun main(args: Array<String>) {
Runtime.getRuntime().addShutdownHook(Thread(app::stop))

app.start()
=======
Runtime.getRuntime().addShutdownHook(
Thread {
app.disable()
},
)
>>>>>>> 2e25971 (chore(spotless): use ktlint)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package dev.mizule.imagery.app.model

data class ImageLookupResult(
val url: String,
val delete: String = "$url/del"
val delete: String = "$url/del",
)

0 comments on commit ec9e1c3

Please sign in to comment.