Skip to content

Commit b24ae08

Browse files
committed
Update Submissions Endpoints and perPage
1 parent 14eb524 commit b24ae08

File tree

8 files changed

+27304
-19666
lines changed

8 files changed

+27304
-19666
lines changed

src/apps/review/src/config/index.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const QUESTION_RESPONSE_TYPE_MAPPING_DISPLAY: { [key: string]: string }
5656
REQUIRED: 'Required',
5757
}
5858
export const TABLE_DATE_FORMAT = 'MMM DD, HH:mm A'
59-
export const TABLE_PAGINATION_ITEM_PER_PAGE = 100
59+
export const TABLE_PAGINATION_ITEM_PER_PAGE = 10
6060
export const THRESHOLD_SHORT_TIME = 2 * 60 * 60 * 1000 // in miliseconds
6161

6262
export const ORDINAL_SUFFIX = new Map([[1, '1st'], [2, '2nd'], [3, '3rd']])

src/apps/review/src/lib/hooks/useFetchChallengeResults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function useFetchChallengeResults(
4545
Error
4646
>(`reviewBaseUrl/projectResult/${challengeInfo?.legacyId}`, {
4747
fetcher: async () => {
48-
const results = await fetchProjectResults(1, 5000, `${challengeInfo?.legacyId}`)
48+
const results = await fetchProjectResults(1, 50, `${challengeInfo?.legacyId}`)
4949
return results.data
5050
},
5151
isPaused: () => !challengeInfo?.legacyId,

src/apps/review/src/lib/hooks/useFetchChallengeSubmissions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function useFetchChallengeSubmissions(
3131
Error
3232
>(`reviewBaseUrl/submissions/${challengeId}`, {
3333
fetcher: async () => {
34-
const results = await fetchSubmissions(1, 5000, challengeId ?? '')
34+
const results = await fetchSubmissions(1, 50, challengeId ?? '')
3535
return results.data
3636
},
3737
isPaused: () => !challengeId,

src/apps/review/src/lib/services/reviews.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const createContactRequest = async (
106106
message: string
107107
},
108108
BackendContactRequest
109-
>(`${EnvironmentConfig.REVIEW.REVIEW_API}/contact-requests`, {
109+
>(`${EnvironmentConfig.API.V6}/review/contact-requests`, {
110110
challengeId,
111111
message: data.category
112112
? `${data.category}:${data.message}`
@@ -135,7 +135,7 @@ export const fetchSubmissions = async (
135135
const results = await xhrGetAsync<
136136
BackendResponseWithMeta<BackendSubmission[]>
137137
>(
138-
`${EnvironmentConfig.REVIEW.REVIEW_API}/submissions?${qs.stringify({
138+
`${EnvironmentConfig.API.V6}/submissions?${qs.stringify({
139139
challengeId,
140140
page,
141141
perPage,
@@ -157,7 +157,7 @@ export const downloadSubmissionFile = async (
157157
submissionId: string,
158158
): Promise<Blob> => {
159159
const results = await xhrGetBlobAsync<Blob>(
160-
`${EnvironmentConfig.REVIEW.REVIEW_API}/submissions/${submissionId}/download`,
160+
`${EnvironmentConfig.API.V6}/submissions/${submissionId}/download`,
161161
)
162162
return results
163163
}
@@ -181,7 +181,7 @@ export const fetchProjectResults = async (
181181
const results = await xhrGetAsync<
182182
BackendResponseWithMeta<BackendProjectResult[]>
183183
>(
184-
`${EnvironmentConfig.REVIEW.REVIEW_API}/projectResult?${qs.stringify({
184+
`${EnvironmentConfig.API.V6}/review/projectResult?${qs.stringify({
185185
challengeId,
186186
page,
187187
perPage,

src/config/environments/default.env.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,4 @@ export const ADMIN = {
9898
export const REVIEW = {
9999
CHALLENGE_PAGE_URL: 'https://www.topcoder-dev.com/challenges',
100100
PROFILE_PAGE_URL: 'https://profiles.topcoder-dev.com',
101-
REVIEW_API: 'https://api.topcoder-dev.com/v6/review',
102101
}

src/config/environments/global-config.model.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,5 @@ export interface GlobalConfig {
6464
REVIEW: {
6565
CHALLENGE_PAGE_URL: string
6666
PROFILE_PAGE_URL: string
67-
REVIEW_API: string
6867
},
6968
}

src/config/environments/prod.env.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ export const ADMIN = {
2727
export const REVIEW = {
2828
CHALLENGE_PAGE_URL: 'https://www.topcoder.com/challenges',
2929
PROFILE_PAGE_URL: 'https://profiles.topcoder.com',
30-
REVIEW_API: 'https://api.topcoder.com/v6/review',
3130
}

yarn.lock

Lines changed: 27297 additions & 19656 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)