File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/kotlin/infrastructure/api Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
package infrastructure.api
10
10
11
+ import application.controller.RoomController
11
12
import application.presenter.api.deserializer.ApiDeserializer.toRoom
12
13
import application.presenter.api.model.RoomApiDto
14
+ import application.service.Service
15
+ import infrastructure.provider.ManagerProvider
13
16
import io.ktor.serialization.kotlinx.json.json
14
17
import io.ktor.server.application.Application
15
18
import io.ktor.server.application.call
@@ -27,8 +30,9 @@ import io.ktor.server.routing.routing
27
30
28
31
/* *
29
32
* It manages the REST-API of the microservice.
33
+ * @param[provider] the provider of managers.
30
34
*/
31
- class APIController {
35
+ class APIController ( private val provider : ManagerProvider ) {
32
36
/* *
33
37
* Starts the http server to serve the client requests.
34
38
*/
@@ -69,6 +73,7 @@ class APIController {
69
73
2. creo il digital twin su Azure Digital Twins
70
74
*/
71
75
val room = call.receive<RoomApiDto >().toRoom()
76
+ Service .CreateRoom (room, RoomController (provider.roomDigitalTwinManager))
72
77
call.respondText(" [${Thread .currentThread().name} ] Room POST! \n $room " )
73
78
}
74
79
get(" $apiPath /rooms/{roomId}" ) {
You can’t perform that action at this time.
0 commit comments