File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
server/src/main/kotlin/application
shared/src/commonMain/kotlin/network Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ fun Application.configureRooms() {
1111 routing {
1212 authenticate {
1313 route(" rooms" ) {
14- get { call.respond(listRoom()) }
15- get (" create" ) {
14+ post { call.respond(listRoom()) }
15+ post (" create" ) {
1616 call.respond(createRoom(call.getPlayer()))
1717 }
1818 }
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ data class ViewedRoom(
1818 val curPlayers : Int ,
1919)
2020
21- suspend fun createRoom () = client.get (" $currentUrl /rooms/create" ) {
21+ suspend fun createRoom () = client.post (" $currentUrl /rooms/create" ) {
2222 basicAuth(username, sessionId)
2323}.body<ViewedRoom >()
2424suspend fun getViewedRooms () = runCatching {
25- client.get (" $currentUrl /rooms" ) {
25+ client.post (" $currentUrl /rooms" ) {
2626 basicAuth(username, sessionId)
2727 }.body<List <ViewedRoom >>()
2828}.getOrElse { listOf () }
You can’t perform that action at this time.
0 commit comments