admin: Add a button to permit deleting strange submissions
This commit is contained in:
parent
0b04185933
commit
632eb62f1f
3 changed files with 24 additions and 1 deletions
|
|
@ -35,6 +35,15 @@ func declareHealthRoutes(router *gin.RouterGroup) {
|
|||
router.GET("/health.json", GetHealth)
|
||||
router.GET("/submissions-stats.json", GetSubmissionsStats)
|
||||
router.GET("/validations-stats.json", GetValidationsStats)
|
||||
|
||||
router.DELETE("/submissions/*path", func(c *gin.Context) {
|
||||
err := os.Remove(path.Join(TimestampCheck, c.Params.ByName("path")))
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusNotFound, gin.H{"errmsg": err.Error()})
|
||||
return
|
||||
}
|
||||
c.Status(http.StatusOK)
|
||||
})
|
||||
}
|
||||
|
||||
type healthFileReport struct {
|
||||
|
|
|
|||
Reference in a new issue