Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 855879d

Browse files
authored
Merge pull request #456 from 52cs/fix-lint-455
2 parents 5e2a247 + 03f10ce commit 855879d

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

src/config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ module.exports.frontendConfigs = {
8484
GITHUB_TEAM_URL: process.env.GITHUB_TEAM_URL || 'https://github.com/orgs/',
8585
GITLAB_GROUP_URL: process.env.GITLAB_GROUP_URL || 'https://gitlab.com/groups/',
8686
TC_API_V5_URL: process.env.TC_API_V5_URL || 'https://api.topcoder-dev.com/v5',
87-
TC_API_V4_URL: {
87+
TOPCODER_VALUES: {
8888
dev: {
89-
process.env.TC_API_V4_URL || 'https://api.topcoder-dev.com/v4',
89+
TC_API_V4_URL: process.env.TC_API_V4_URL || 'https://api.topcoder-dev.com/v4',
9090
},
9191
prod: {
92-
process.env.TC_API_V4_URL || 'https://api.topcoder.com/v4',
92+
TC_API_V4_URL: process.env.TC_API_V4_URL || 'https://api.topcoder.com/v4',
9393
},
9494
},
9595
TOPCODER_ENV: process.env.TOPCODER_ENV || 'dev',

src/front/src/app/projects/project.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ angular.module('topcoderX')
184184
ProjectService.getTags = function() {
185185
return $http({
186186
method: 'GET',
187-
url: $rootScope.appConfig.TC_API_V4_URL[$rootScope.appConfig.TOPCODER_ENV] + '/technologies,
187+
url: $rootScope.appConfig.TOPCODER_VALUES[$rootScope.appConfig.TOPCODER_ENV].TC_API_V4_URL + '/technologies',
188188
headers: {
189189
"Content-Type": "application/json",
190190
"Authorization": "Bearer " + AuthService.getTokenV3()

src/front/src/app/upsertproject/upsertproject.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ <h2>{{title}}</h2>
7878
<br />
7979
<br />
8080
<label class="form-label">Tags:</label>
81-
<!-- TODO: care about order or not
8281
<ui-select multiple ng-model="project.tags" theme="bootstrap" close-on-select="false" on-select="$select.selected.sort()">
83-
-->
84-
<ui-select multiple ng-model="project.tags" theme="bootstrap" close-on-select="false">
8582
<ui-select-match placeholder="Select...">
8683
{{$item}}
8784
</ui-select-match>

src/services/ProjectService.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ async function _createOrMigrateRepository(repoUrl, project, currentUser) {
159159
);
160160

161161
await createHook({projectId: project.id}, currentUser, repoUrl);
162+
163+
const oldProject = await dbHelper.getById(models.Project, oldRepo.projectId);
164+
return _.isEqual(oldProject.tags, project.tags) ? [] : challengeUUIDs;
162165
}
163166
catch (err) {
164167
throw new Error(`Update ProjectId for Repository, Issue, CopilotPayment failed. Repo ${repoUrl}. Internal Error: ${err}`);
165168
}
166-
167-
const oldProject = await dbHelper.getById(models.Project, oldRepo.projectId);
168-
return _.isEqual(oldProject.tags, project.tags) ? [] : challengeUUIDs;
169169
} else {
170170
try {
171171
await dbHelper.create(models.Repository, {

0 commit comments

Comments
 (0)