This commit is contained in:
Liang Ding 2022-07-05 21:21:47 +08:00
parent 9350d5d224
commit 4bfe4490a7
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 41 additions and 21 deletions

View file

@ -43,7 +43,7 @@ func checkoutRepo(c *gin.Context) {
}
}
func getRepoIndexLogs(c *gin.Context) {
func getRepoSnapshots(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
@ -66,6 +66,22 @@ func getRepoIndexLogs(c *gin.Context) {
}
}
func getRepoTagSnapshots(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
snapshots, err := model.GetTagSnapshots()
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
ret.Data = map[string]interface{}{
"snapshots": snapshots,
}
}
func createSnapshot(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)