From 02627a737842d7e0f517a7f471ef653ade5064a1 Mon Sep 17 00:00:00 2001 From: xiaoyv404 Date: Tue, 30 Jan 2024 18:49:49 +0800 Subject: [PATCH] rename --- .../xiaoyv404/mirai/app/webAPI/model/MinecraftPlayerApiModel.kt | 2 +- .../mirai/app/webAPI/router/mincreaftServer/PlayerKtTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/xiaoyv404/mirai/app/webAPI/model/MinecraftPlayerApiModel.kt b/src/main/kotlin/com/xiaoyv404/mirai/app/webAPI/model/MinecraftPlayerApiModel.kt index b2c0a25..5270dc0 100644 --- a/src/main/kotlin/com/xiaoyv404/mirai/app/webAPI/model/MinecraftPlayerApiModel.kt +++ b/src/main/kotlin/com/xiaoyv404/mirai/app/webAPI/model/MinecraftPlayerApiModel.kt @@ -6,7 +6,7 @@ import kotlinx.serialization.Serializable @Serializable data class MinecraftPlayerApiModel( val id: String, - val name: String, + val uuid: String, val lastLoginTime: String, val lastLoginServer: String, val permissions: Permissions, diff --git a/src/test/kotlin/com/xiaoyv404/mirai/app/webAPI/router/mincreaftServer/PlayerKtTest.kt b/src/test/kotlin/com/xiaoyv404/mirai/app/webAPI/router/mincreaftServer/PlayerKtTest.kt index 44119dd..c9d0a4b 100644 --- a/src/test/kotlin/com/xiaoyv404/mirai/app/webAPI/router/mincreaftServer/PlayerKtTest.kt +++ b/src/test/kotlin/com/xiaoyv404/mirai/app/webAPI/router/mincreaftServer/PlayerKtTest.kt @@ -20,7 +20,7 @@ internal class PlayerKtTest : DatabaseTest() { NfClock.mockTime(clock) client.get("/lab/minecraftSever/players/online").apply { assertEquals(HttpStatusCode.OK, status) - assertEquals("{\"code\":2001,\"msg\":\"接口调用成功\",\"data\":[{\"id\":\"Test\",\"name\":\"test\",\"lastLoginTime\":\"2006-04-16T06:58:39.810\",\"lastLoginServer\":\"Test\",\"permissions\":\"OP\"},{\"id\":\"Test2\",\"name\":\"test2\",\"lastLoginTime\":\"2006-04-16T06:58:39.810\",\"lastLoginServer\":\"Test\",\"permissions\":\"Default\"},{\"id\":\"2429334909\",\"name\":\"2429334909\",\"lastLoginTime\":\"2006-04-16T06:58:39.810\",\"lastLoginServer\":\"Test\",\"permissions\":\"Default\"}]}", bodyAsText()) + assertEquals("{\"code\":2001,\"msg\":\"接口调用成功\",\"data\":[{\"id\":\"Test\",\"uuid\":\"test\",\"lastLoginTime\":\"2006-04-16T06:58:39.810\",\"lastLoginServer\":\"Test\",\"permissions\":\"OP\"},{\"id\":\"Test2\",\"uuid\":\"test2\",\"lastLoginTime\":\"2006-04-16T06:58:39.810\",\"lastLoginServer\":\"Test\",\"permissions\":\"Default\"},{\"id\":\"2429334909\",\"uuid\":\"2429334909\",\"lastLoginTime\":\"2006-04-16T06:58:39.810\",\"lastLoginServer\":\"Test\",\"permissions\":\"Default\"}]}", bodyAsText()) } } } \ No newline at end of file