Skip to content

Commit 430a65e

Browse files
committed
GetAppMetadataListByEnvironment
1 parent 764a34d commit 430a65e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/sql/repository/AppListingRepository.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ func (impl *AppListingRepositoryImpl) FetchAppsEnvContainers(envId int, limit, o
145145
LEFT JOIN
146146
(SELECT pco.pipeline_id,MAX(pco.created_on) as last_deployed_time from pipeline_config_override pco
147147
GROUP BY pco.pipeline_id) ld ON ld.pipeline_id = p.id
148-
WHERE a.active = true`
148+
WHERE a.active = true
149+
ORDER BY a.app_name`
149150

150151
queryParams := []interface{}{envId, envId}
151152

@@ -155,8 +156,6 @@ func (impl *AppListingRepositoryImpl) FetchAppsEnvContainers(envId int, limit, o
155156
queryParams = append(queryParams, pg.In(appIds))
156157
}
157158

158-
query += " ORDER BY a.app_name"
159-
160159
if limit > 0 {
161160
query += fmt.Sprintf("LIMIT ? ")
162161
queryParams = append(queryParams, limit)

0 commit comments

Comments
 (0)