From 39921809eeba56165c10e211f69cac10f5b01048 Mon Sep 17 00:00:00 2001 From: iofq Date: Mon, 18 Nov 2024 20:30:19 -0600 Subject: [PATCH] Update db api docs --- api/db.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/db.go b/api/db.go index 5f7727ff..f6d0e5a8 100644 --- a/api/db.go +++ b/api/db.go @@ -11,16 +11,17 @@ import ( "github.com/gin-gonic/gin" ) -// @Summary TODO -// @Description **ToDo** -// @Description To Do +// @Summary DB Cleanup +// @Description **Cleanup Aptly DB** +// @Description Database cleanup removes information about unreferenced packages and deletes files in the package pool that aren’t used by packages anymore. +// @Description It is a good idea to run this command after massive deletion of mirrors, snapshots or local repos. // @Tags Database // @Produce json -// @Success 200 {object} string "msg" +// @Param _async query bool false "Run task in background using tasks API" +// @Success 200 {object} string "Output" // @Failure 404 {object} Error "Not Found" // @Router /api/db/cleanup [post] func apiDbCleanup(c *gin.Context) { - resources := []string{string(task.AllResourcesKey)} maybeRunTaskInBackground(c, "Clean up db", resources, func(out aptly.Progress, detail *task.Detail) (*task.ProcessReturnValue, error) { var err error