MSP-5186 Use apierrrors.Error

This commit is contained in:
Синельник Тимур Романович committed 2025-04-03 14:01:25 +03:00
1 parent 3b43e7875d
commit 199d576956
12 files changed
+333 -213

No files matched your search

+2 -2
View File
@@ -31,7 +31,7 @@ func NewSecure(service SecureService) Secure {
// @Produce json
// @Param body body domain.AuthenticateRequest true "Тело запроса"
// @Success 200 {array} domain.AuthenticateResponse
// @Failure 500 {object} domain.GrpcError
// @Failure 500 {object} apierrors.Error
// @Router /secure/authenticate [POST]
func (c Secure) Authenticate(ctx context.Context, req domain.AuthenticateRequest) (*domain.AuthenticateResponse, error) {
result, err := c.service.Authenticate(ctx, req.Token)
@@ -65,7 +65,7 @@ func (c Secure) Authenticate(ctx context.Context, req domain.AuthenticateRequest
// @Produce json
// @Param body body domain.AuthorizeRequest true "Тело запрос"
// @Success 200 {array} domain.AuthorizeResponse
// @Failure 500 {object} domain.GrpcError
// @Failure 500 {object} apierrors.Error
// @Router /secure/authorize [POST]
func (c Secure) Authorize(ctx context.Context, req domain.AuthorizeRequest) (*domain.AuthorizeResponse, error) {
result, err := c.service.Authorize(ctx, req.ApplicationId, req.Endpoint)