TP-55555 | Add new project changes (#17)

This commit is contained in:
Lokesh Dugar
2024-09-11 12:03:08 +05:30
committed by GitHub
parent 6eb89269d4
commit 90792dcb47
3 changed files with 4 additions and 1 deletions

View File

@@ -80,4 +80,4 @@ aws:
#mjolnir config
mjolnir:
service.url: https://qa-mjolnir-service.np.navi-ppl.in
realm.id: O3G7sCWk4r
realm.id: ZicSxsvBwE

View File

@@ -12,4 +12,5 @@ type Project struct {
ProjectReferenceId string `json:"projectReferenceId" gorm:"primaryKey"`
Name string `json:"name" gorm:"unique"`
Team string `json:"team"`
Icon string `json:"icon"`
}

View File

@@ -23,6 +23,7 @@ type ProjectCreator struct {
type ProjectBody struct {
Name string `json:"name" binding:"required"`
Team string `json:"team" binding:"required"`
Icon string `json:"icon"`
}
func NewProjectCreator(logger *log.Logger, dbClient *gorm.DB, s3Client *aws.Actions, kafkaProducer producer.KProducer) *ProjectCreator {
@@ -53,6 +54,7 @@ func (pc *ProjectCreator) CreateProject(ctx *gin.Context) {
ProjectReferenceId: i.String(),
Name: projectBody.Name,
Team: projectBody.Team,
Icon: projectBody.Icon,
})
if result.Error != nil {