Skip to content

Commit 64527ff

Browse files
v0.2.0 rc2 (#2)
* add api: /testcases * remove /auth
1 parent 0c17954 commit 64527ff

File tree

3 files changed

+6
-75
lines changed

3 files changed

+6
-75
lines changed

backend/internal/api/setup_router.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
"github.com/gin-gonic/gin"
77
"github.com/markhuang1212/code-grader/backend/internal/core"
8+
"github.com/markhuang1212/code-grader/backend/internal/grader"
89
"github.com/markhuang1212/code-grader/backend/internal/types"
910
"github.com/markhuang1212/code-grader/backend/internal/util"
1011
)
@@ -63,5 +64,10 @@ func SetupRouter(cc *core.CoreController) *gin.Engine {
6364
}
6465
})
6566

67+
authorized.GET("/testcases", func(c *gin.Context) {
68+
result := grader.LoadTestcases()
69+
c.JSON(200, result)
70+
})
71+
6672
return r
6773
}

backend/internal/auth/auth.go

Lines changed: 0 additions & 51 deletions
This file was deleted.

backend/internal/auth/auth_test.go

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)