This commit is contained in:
Logan committed 2026-07-09 14:16:56 +08:00
1 parent 0690285147
commit 5618cd2738
154 files changed
+5021 -3161

No files matched your search

+4 -2
View File
@@ -273,7 +273,9 @@ func (h *UserHandler) UpdateApiAccessKey(c *gin.Context) {
// ExtendApiAccessKey 延长有效期(兼容旧接口)// Logan.Li
func (h *UserHandler) ExtendApiAccessKey(c *gin.Context) {
userID := middleware.GetUserID(c)
var req struct{ DurationMonths int `json:"duration_months"` }
var req struct {
DurationMonths int `json:"duration_months"`
}
if err := c.ShouldBindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, model.Response{Code: 400, Message: "参数错误"})
return
@@ -311,4 +313,4 @@ func (h *UserHandler) RevokeApiAccessKey(c *gin.Context) {
return
}
c.JSON(http.StatusOK, model.Response{Code: 200, Message: "访问密钥已删除"})
}
}