feat: test duplicate project and env name

This commit is contained in:
2025-09-28 11:05:41 +05:30
parent 9eaa34d7fe
commit bc67eae7c7
2 changed files with 26 additions and 3 deletions

View File

@@ -42,11 +42,11 @@ func MigrateDb() {
}
}
func GetProjects(name string) ([]Project, error) {
func GetProjects() ([]Project, error) {
InitDb()
var dbProjects []Project
result := DB.Where("name = ?", name).Find(&dbProjects)
result := DB.Find(&dbProjects)
if result.Error != nil {
return nil, errors.New("Some error occured: " + result.Error.Error())