File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2
2
web.json
3
3
judge.json
4
4
web_prod.json
5
- node_modules
5
+ node_modules
6
+ static
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import (
4
4
"encoding/json"
5
5
"errors"
6
6
"fmt"
7
+ "log/slog"
8
+ "net/http"
9
+ "time"
10
+
7
11
"github.com/labstack/echo/v4"
8
12
"github.com/labstack/echo/v4/middleware"
9
13
"github.com/mraron/njudge/pkg/language"
@@ -13,9 +17,6 @@ import (
13
17
_ "github.com/mraron/njudge/pkg/problems/config/problem_yaml"
14
18
_ "github.com/mraron/njudge/pkg/problems/config/task_yaml"
15
19
slogecho "github.com/samber/slog-echo"
16
- "log/slog"
17
- "net/http"
18
- "time"
19
20
20
21
_ "github.com/mraron/njudge/pkg/language/langs/csharp"
21
22
_ "github.com/mraron/njudge/pkg/language/langs/golang"
@@ -73,7 +74,7 @@ func (s Server) PostJudgeHandler() echo.HandlerFunc {
73
74
return func (c echo.Context ) error {
74
75
sub := Submission {}
75
76
if err := c .Bind (& sub ); err != nil {
76
- return err
77
+ return echo . NewHTTPError ( http . StatusBadRequest , err . Error ())
77
78
}
78
79
79
80
inited := false
You can’t perform that action at this time.
0 commit comments