// along with this program. If not, see <https://www.gnu.org/licenses/>.
packagev1
import(
"bytes"
"encoding/json"
"net/http"
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/db"
"github.com/labstack/echo/v4"
)
// HandleTesting is the web handler to reset the db
// @Summary Reset the db to a defined state
// @Description Fills the specified table with the content provided in the payload. You need to enable the testing endpoint before doing this and provide the `Authorization: <token>` secret when making requests to this endpoint. See docs for more details.
// @tags testing
// @Accept json
// @Produce json
// @Param table path string true "The table to reset"
// @Success 201 {array} user.User "Everything has been imported successfully."
// @Failure 500 {object} models.Message "Internal server error."