forked from maiora/backend-api
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			8e456610f3
			...
			5da7cfcfc2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 5da7cfcfc2 | |||
| 8a934dca5b | 
@ -28,7 +28,7 @@ fun Application.module(configFile: Properties) {
 | 
			
		||||
    val secret = config.property("ktor.jwt.secret").getString()
 | 
			
		||||
    configureDatabases(dbUrl, username, password)
 | 
			
		||||
    configureSecurity(secret)
 | 
			
		||||
    configureRouting(dbUrl, username, password)
 | 
			
		||||
    configureRouting()
 | 
			
		||||
    configureSerialization()
 | 
			
		||||
 | 
			
		||||
    install(CallLogging)
 | 
			
		||||
 | 
			
		||||
@ -7,7 +7,7 @@ import io.ktor.server.application.*
 | 
			
		||||
import io.ktor.server.response.*
 | 
			
		||||
import io.ktor.server.routing.*
 | 
			
		||||
 | 
			
		||||
fun Application.configureRouting(dbUrl : String, username : String, password : String) {
 | 
			
		||||
fun Application.configureRouting() {
 | 
			
		||||
    routing {
 | 
			
		||||
        get("/") {
 | 
			
		||||
            call.respondText("Hello World!")
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ import java.util.*
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
fun Route.auth(accountsRepository: AccountsRepositoryImpl) {
 | 
			
		||||
    route("/auth") {
 | 
			
		||||
    route("/api/auth") {
 | 
			
		||||
        post() {
 | 
			
		||||
            // Riceve il body della richiesta e lo deserializza in ReceivedResponse
 | 
			
		||||
            val receivedResponse = try {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user