完善项目
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user