优化api密钥

This commit is contained in:
yml2213
2026-08-03 10:38:06 +08:00
parent 9a3471cc61
commit 7fe4a05ed7
6 changed files with 71 additions and 15 deletions
+10
View File
@@ -302,6 +302,16 @@ func (h *MerchantHandler) UpdateAPIClientStatus(c *gin.Context) {
response.OK(c, nil)
}
// DeleteAPIClient DELETE /api/merchant/api-clients/:id
func (h *MerchantHandler) DeleteAPIClient(c *gin.Context) {
id, _ := strconv.ParseUint(c.Param("id"), 10, 64)
if err := h.merchantSvc.DeleteAPIClient(middleware.GetMerchantID(c), uint(id), middleware.GetUserID(c)); err != nil {
response.BadRequest(c, err.Error())
return
}
response.OK(c, nil)
}
func (h *MerchantHandler) ListCallbacks(c *gin.Context) {
list, err := h.callbackSvc.ListSubscriptions(middleware.GetMerchantID(c))
if err != nil {