Merge remote-tracking branch 'upstream/main'
# Conflicts: # src/main/kotlin/eu/maiora/plugins/Routing.kt
This commit is contained in:
commit
7df30d33ab
@ -28,7 +28,7 @@ fun Application.module(configFile: Properties) {
|
|||||||
val secret = config.property("ktor.jwt.secret").getString()
|
val secret = config.property("ktor.jwt.secret").getString()
|
||||||
configureDatabases(dbUrl, username, password)
|
configureDatabases(dbUrl, username, password)
|
||||||
configureSecurity(secret)
|
configureSecurity(secret)
|
||||||
configureRouting(dbUrl, username, password)
|
configureRouting()
|
||||||
configureSerialization()
|
configureSerialization()
|
||||||
|
|
||||||
install(CallLogging)
|
install(CallLogging)
|
||||||
|
@ -7,7 +7,7 @@ import io.ktor.server.application.*
|
|||||||
import io.ktor.server.response.*
|
import io.ktor.server.response.*
|
||||||
import io.ktor.server.routing.*
|
import io.ktor.server.routing.*
|
||||||
|
|
||||||
fun Application.configureRouting(dbUrl : String, username : String, password : String) {
|
fun Application.configureRouting() {
|
||||||
routing {
|
routing {
|
||||||
get("/") {
|
get("/") {
|
||||||
call.respondText("Hello World!")
|
call.respondText("Hello World!")
|
||||||
|
@ -16,7 +16,7 @@ import java.util.*
|
|||||||
|
|
||||||
|
|
||||||
fun Route.auth(accountsRepository: AccountsRepositoryImpl) {
|
fun Route.auth(accountsRepository: AccountsRepositoryImpl) {
|
||||||
route("/auth") {
|
route("/api/auth") {
|
||||||
post() {
|
post() {
|
||||||
// Riceve il body della richiesta e lo deserializza in ReceivedResponse
|
// Riceve il body della richiesta e lo deserializza in ReceivedResponse
|
||||||
val receivedResponse = try {
|
val receivedResponse = try {
|
||||||
|
Loading…
Reference in New Issue
Block a user