重构: 源码文件蛇形命名, 接口去I头(BindRequestContext/SimApiAuthChecker), 清理C#相关说明, serialization依赖路径改 serialization-cj

This commit is contained in:
2026-08-25 13:43:26 +08:00
parent 829f009229
commit 30e5f165f2
56 changed files with 319 additions and 332 deletions
+34
View File
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2025 SimcuTeam. All rights reserved.
* 遵循 MIT 许可证。
* Controllers/SimApiAuthController:认证相关内置路由。
*/
package simcu::simapi.controllers
import soulsoft_web_mvc.annotations.*
import simcu::simapi.communications.*
import simcu::simapi.helpers.*
/**
* 认证控制器:退出登录。
*/
public class SimApiAuthController <: SimApiBaseController {
private let _auth: SimApiAuth
public init(auth: SimApiAuth) {
this._auth = auth
}
/**
* POST /auth/logout:退出登录(void 自动封装为 SimApiBaseResponse())。
* 对应路由 [HttpPost]
* 由 MapControllerRoute(pattern=LogoutRoute) 注册。
*/
@HttpPost["/auth/logout"]
public func logout(): Unit {
if (let Some(token) <- request.headers.get("Token")) {
_auth.logout(token)
}
}
}