完善项目

This commit is contained in:
BBIT-Kai
2026-04-09 15:46:26 +08:00
parent 63bd6da895
commit 5971791038
6 changed files with 9 additions and 60 deletions
@@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable
@Serializable
open class BaseResponse<T>(
val status: Boolean = true,
val message: String = if(status) "操作成功" else "操作失败",
val message: String = if (status) "操作成功" else "操作失败",
val data: T? = null,
)
@@ -18,7 +18,11 @@ fun Application.configureCORS() {
// 进一步配置 CORS
allowMethod(HttpMethod.Get)
allowMethod(HttpMethod.Post)
allowMethod(HttpMethod.Put)
allowMethod(HttpMethod.Patch)
allowMethod(HttpMethod.Delete)
allowMethod(HttpMethod.Options)
allowHeader(HttpHeaders.ContentType)
allowHeader(HttpHeaders.Authorization)
}
}
}