package com.correx.apps.server.routes

import com.correx.apps.server.ServerModule
import com.correx.apps.server.registry.WorkflowSummary
import io.ktor.server.response.respond
import io.ktor.server.routing.Route
import io.ktor.server.routing.get

fun Route.workflowRoutes(module: ServerModule) {
    get("/workflows") {
        val workflows: List<WorkflowSummary> = module.workflowRegistry.listAll()
        call.respond(workflows)
    }
}
