优化api密钥
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user