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

Commit 790a1d8

Browse files
committed
Merge branch 'dev' of github.com:cloudspokes/tc-api into dev
2 parents 0ac1e09 + da705da commit 790a1d8

File tree

4 files changed

+29
-20
lines changed

4 files changed

+29
-20
lines changed

apiary.apib

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6943,31 +6943,35 @@ Request
69436943
"roundId": 6,
69446944
"roundName": "Past Srm Round",
69456945
"divisionDescription": "Unrated Division",
6946-
"levelDescription": "Level 2001"
6946+
"levelDescription": "Level 2001",
6947+
"editorialLink": "http://editlink6"
69476948
},
69486949
{
69496950
"contestId": 3006,
69506951
"contestName": "Contest 3006",
69516952
"roundId": 7,
69526953
"roundName": "Past Tournament Round",
69536954
"divisionDescription": "Division-I",
6954-
"levelDescription": "Level 2001"
6955+
"levelDescription": "Level 2001",
6956+
"editorialLink": "http://editlink7"
69556957
},
69566958
{
69576959
"contestId": 3007,
69586960
"contestName": "Contest 3007",
69596961
"roundId": 8,
69606962
"roundName": "Past Long Round",
69616963
"divisionDescription": "Division-II",
6962-
"levelDescription": "Level 2001"
6964+
"levelDescription": "Level 2001",
6965+
"editorialLink": "http://editlink8"
69636966
},
69646967
{
69656968
"contestId": 3008,
69666969
"contestName": "Contest 3008",
69676970
"roundId": 9,
69686971
"roundName": "Past Event Round",
69696972
"divisionDescription": "No Division Applicable",
6970-
"levelDescription": "Level 2001"
6973+
"levelDescription": "Level 2001",
6974+
"editorialLink": "http://editlink9"
69716975
}
69726976
]
69736977
}

queries/get_rounds_for_problem

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ SELECT
44
r.contest_id,
55
(SELECT name FROM contest c WHERE c.contest_id = r.contest_id) AS contest_name,
66
(SELECT division_desc FROM division_lu d WHERE p.division_id = d.division_id) AS division_description,
7-
p.level_desc AS level_description
7+
p.level_desc AS level_description,
8+
r.editorial_link
89
FROM
910
problem p,
1011
round r

test/sqls/srmRoundsForProblem/topcoder_dw__insert

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ INSERT INTO round_type_lu (round_type_id, round_type_desc, algo_rating_type_id)
3434
INSERT INTO round_type_lu (round_type_id, round_type_desc, algo_rating_type_id) VALUES (27, 'Marathon Match QA', NULL);
3535

3636
INSERT INTO contest (contest_id, name) VALUES (3000, 'Contest 3000');
37-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (1, 3000, 1, 'Active Srm Round', 'A');
37+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (1, 3000, 1, 'Active Srm Round', 'A', 'http://editlink1');
3838
INSERT INTO contest (contest_id, name) VALUES (3001, 'Contest 3001');
39-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (2, 3001, 1, 'Active Srm Round 2', 'A');
39+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (2, 3001, 1, 'Active Srm Round 2', 'A', 'http://editlink2');
4040
INSERT INTO contest (contest_id, name) VALUES (3002, 'Contest 3002');
41-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (3, 3002, 2, 'Active Tournament Round', 'A');
41+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (3, 3002, 2, 'Active Tournament Round', 'A', 'http://editlink3');
4242
INSERT INTO contest (contest_id, name) VALUES (3003, 'Contest 3003');
43-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (4, 3003, 10, 'Active Long Round', 'A');
43+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (4, 3003, 10, 'Active Long Round', 'A', 'http://editlink4');
4444
INSERT INTO contest (contest_id, name) VALUES (3004, 'Contest 3004');
45-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (5, 3004, 20, 'Active Event Round', 'A');
45+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (5, 3004, 20, 'Active Event Round', 'A','http://editlink5');
4646
INSERT INTO contest (contest_id, name) VALUES (3005, 'Contest 3005');
47-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (6, 3005, 1, 'Past Srm Round', 'P');
47+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (6, 3005, 1, 'Past Srm Round', 'P','http://editlink6');
4848
INSERT INTO contest (contest_id, name) VALUES (3006, 'Contest 3006');
49-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (7, 3006, 2, 'Past Tournament Round', 'P');
49+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (7, 3006, 2, 'Past Tournament Round', 'P','http://editlink7');
5050
INSERT INTO contest (contest_id, name) VALUES (3007, 'Contest 3007');
51-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (8, 3007, 10, 'Past Long Round', 'P');
51+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (8, 3007, 10, 'Past Long Round', 'P', 'http://editlink8');
5252
INSERT INTO contest (contest_id, name) VALUES (3008, 'Contest 3008');
53-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (9, 3008, 20, 'Past Event Round', 'P');
53+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (9, 3008, 20, 'Past Event Round', 'P','http://editlink9');
5454
INSERT INTO contest (contest_id, name) VALUES (3009, 'Contest 3009');
55-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (10, 3009, 3, 'Past Practice Round', 'P');
55+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (10, 3009, 3, 'Past Practice Round', 'P','http://editlink10');
5656
INSERT INTO contest (contest_id, name) VALUES (3010, 'Contest 3010');
57-
INSERT INTO round (round_id, contest_id, round_type_id, name, status) VALUES (11, 3010, 9, 'Past Tournament Practice Round', 'P');
57+
INSERT INTO round (round_id, contest_id, round_type_id, name, status, editorial_link) VALUES (11, 3010, 9, 'Past Tournament Practice Round', 'P','http://editlink11');
5858

5959
INSERT INTO room (room_id, round_id, name, division_id, division_desc) VALUES (4001, 1, 'Room 4001', -1, 'No Division Applicable');
6060
INSERT INTO room (room_id, round_id, name, division_id, division_desc) VALUES (4002, 2, 'Room 4002', 0, 'Unrated Division');

test/test.srmRoundsForProblem.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,31 +265,35 @@ describe('SRM Rounds For Problem', function () {
265265
"roundId": 6,
266266
"roundName": "Past Srm Round",
267267
"divisionDescription": "Unrated Division",
268-
"levelDescription": "Level 2001"
268+
"levelDescription": "Level 2001",
269+
"editorialLink": "http://editlink6"
269270
},
270271
{
271272
"contestId": 3006,
272273
"contestName": "Contest 3006",
273274
"roundId": 7,
274275
"roundName": "Past Tournament Round",
275276
"divisionDescription": "Division-I",
276-
"levelDescription": "Level 2001"
277+
"levelDescription": "Level 2001",
278+
"editorialLink": "http://editlink7"
277279
},
278280
{
279281
"contestId": 3007,
280282
"contestName": "Contest 3007",
281283
"roundId": 8,
282284
"roundName": "Past Long Round",
283285
"divisionDescription": "Division-II",
284-
"levelDescription": "Level 2001"
286+
"levelDescription": "Level 2001",
287+
"editorialLink": "http://editlink8"
285288
},
286289
{
287290
"contestId": 3008,
288291
"contestName": "Contest 3008",
289292
"roundId": 9,
290293
"roundName": "Past Event Round",
291294
"divisionDescription": "No Division Applicable",
292-
"levelDescription": "Level 2001"
295+
"levelDescription": "Level 2001",
296+
"editorialLink": "http://editlink9"
293297
}
294298
]
295299
},

0 commit comments

Comments
 (0)