update
This commit is contained in:
1 parent
0690285147
commit
5618cd2738
154 files changed
+5021
-3161
No files matched your search
@@ -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: "访问密钥已删除"})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user