File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ function Cases:init(item, parent)
61
61
local total = item .total_testcases ~= vim .NIL and item .total_testcases or 0
62
62
for i = 1 , total do
63
63
self .cases [i ] = Case ({
64
+ -- TODO: cache the testcases on submission,
65
+ -- so it doesn't get out of sync
64
66
input = self .console .testcase .testcases [i ],
65
67
output = item .code_answer [i ],
66
68
expected = item .expected_code_answer [i ],
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ function Testcase:populate()
29
29
for i , case in ipairs (self .console .question .q .testcase_list ) do
30
30
if i ~= 1 then table.insert (tbl , " " ) end
31
31
32
+ -- TODO: Think of a better way to do this. Don't store testcases as a single strings
32
33
table.insert (self .testcases , case :gsub (" \n " , " " )[1 ])
33
34
34
35
for s in vim .gsplit (case , " \n " , { trimempty = true }) do
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function Auth.handle(res, err)
31
31
local auth = res .data .userStatus
32
32
err = {}
33
33
34
- if auth .id == vim .NIL then
34
+ if ( not config . is_cn and auth .id == vim .NIL ) or ( config . is_cn and auth . slug == vim . NIL ) then
35
35
err .msg = " Session expired?"
36
36
elseif not auth .is_signed_in then
37
37
err .msg = " Sign-in failed"
You can’t perform that action at this time.
0 commit comments