TP-55555 | kafka fix
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"cybertron/internal/client/aws"
|
||||
"cybertron/models/db"
|
||||
"cybertron/pkg/kafka/producer"
|
||||
"cybertron/pkg/log"
|
||||
"encoding/hex"
|
||||
"math/big"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -46,6 +48,13 @@ func (pc *ProjectCreator) CreateProject(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
var uuidGenerated = uuid.New()
|
||||
secret := make([]byte, 16)
|
||||
_, err := rand.Read(secret)
|
||||
if err != nil {
|
||||
// handle error here
|
||||
return
|
||||
}
|
||||
|
||||
//converting uuid to all numbers since sentry only supports
|
||||
//all digit project uuid
|
||||
var i big.Int
|
||||
@@ -58,6 +67,7 @@ func (pc *ProjectCreator) CreateProject(ctx *gin.Context) {
|
||||
Team: projectBody.Team,
|
||||
Icon: projectBody.Icon,
|
||||
GithubUrl: projectBody.GithubUrl,
|
||||
Secret: hex.EncodeToString(secret),
|
||||
})
|
||||
|
||||
if result.Error != nil {
|
||||
|
||||
Reference in New Issue
Block a user