Merge branch 'dev' into 'main'
Changed s3.EndpointURL to VerificationEndpointURL See merge request backend/verification!6
This commit is contained in:
commit
51b0e52784
@ -5,6 +5,9 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"mime/multipart"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/policy"
|
||||
"github.com/minio/minio-go/v7/pkg/set"
|
||||
@ -13,9 +16,7 @@ import (
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"go.uber.org/zap"
|
||||
"mime/multipart"
|
||||
"penahub.gitlab.yandexcloud.net/backend/verification/internal/models"
|
||||
"time"
|
||||
)
|
||||
|
||||
type VerificationRepository struct {
|
||||
@ -25,6 +26,7 @@ type VerificationRepository struct {
|
||||
}
|
||||
|
||||
const (
|
||||
VerificationEndpointURL = "https://hub.pena.digital"
|
||||
VerificationBucket = "verification1"
|
||||
VerificationCollection = "verification"
|
||||
)
|
||||
@ -161,7 +163,7 @@ func (r *VerificationRepository) Insert(
|
||||
record.Files = []models.VerificationFiles{
|
||||
{
|
||||
Name: "certificate",
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", r.s3.EndpointURL(), VerificationBucket, userID, certFH.Filename),
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", VerificationEndpointURL, VerificationBucket, userID, certFH.Filename),
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -170,15 +172,15 @@ func (r *VerificationRepository) Insert(
|
||||
record.Files = append(record.Files, []models.VerificationFiles{
|
||||
{
|
||||
Name: "inn",
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", r.s3.EndpointURL(), VerificationBucket, userID, innFH.Filename),
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", VerificationEndpointURL, VerificationBucket, userID, innFH.Filename),
|
||||
},
|
||||
{
|
||||
Name: "rule",
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", r.s3.EndpointURL(), VerificationBucket, userID, ruleFH.Filename),
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", VerificationEndpointURL, VerificationBucket, userID, ruleFH.Filename),
|
||||
},
|
||||
{
|
||||
Name: "egrule",
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", r.s3.EndpointURL(), VerificationBucket, userID, egruleFH.Filename),
|
||||
Url: fmt.Sprintf("%s/%s/%s/%s", VerificationEndpointURL, VerificationBucket, userID, egruleFH.Filename),
|
||||
},
|
||||
}...)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user