Update mock Gitea server

This commit is contained in:
Laszlo Fogas 2020-09-30 13:27:34 +02:00
parent 1437914a24
commit 50fc1320fe

View file

@ -33,6 +33,7 @@ func Handler() http.Handler {
e.DELETE("/api/v1/repos/:owner/:name/hooks/:id", deleteRepoHook)
e.POST("/api/v1/repos/:owner/:name/statuses/:commit", createRepoCommitStatus)
e.GET("/api/v1/user/repos", getUserRepos)
e.GET("/api/v1/version", getVersion)
return e
}
@ -99,6 +100,10 @@ func getUserRepos(c *gin.Context) {
}
}
func getVersion(c *gin.Context) {
c.JSON(200, map[string]interface{}{"version": "1.10"})
}
const listRepoHookPayloads = `
[
{