2025-05-26 17:31:46: merge [master:4b0510d2764306aa9a1a7375512e74d7d7876cef];
This commit is contained in:
1 parent
c5b82152e0
commit
c0687a264e
20 files changed
+474
-38
No files matched your search
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
type AccessListRepo interface {
|
||||
GetAccessListByAppId(ctx context.Context, appId int) ([]entity.AccessList, error)
|
||||
DeleteAccessList(ctx context.Context, appId int, methods []string) error
|
||||
}
|
||||
|
||||
type AccessListSetOneTx interface {
|
||||
@@ -155,3 +156,15 @@ func (s AccessList) SetList(ctx context.Context, req domain.AccessListSetListReq
|
||||
|
||||
return methodInfos, nil
|
||||
}
|
||||
|
||||
func (s AccessList) DeleteList(ctx context.Context, req domain.AccessListDeleteListRequest) error {
|
||||
_, err := s.appRepo.GetApplicationById(ctx, req.AppId)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "get application by id")
|
||||
}
|
||||
err = s.accessListRepo.DeleteAccessList(ctx, req.AppId, req.Methods)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "delete access_list")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
+2
-1
@@ -3,9 +3,10 @@ package service
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"isp-system-service/domain"
|
||||
"isp-system-service/entity"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type Domain struct {
|
||||
|
||||
Reference in new issue
Block a user