add read-only db work mode

This commit is contained in:
nikk gitanes
2020-11-03 01:24:32 +03:00
parent 06d9a364d1
commit 045a0914ac
4 changed files with 18 additions and 4 deletions

View File

@@ -182,7 +182,7 @@ func torrentGet(c echo.Context) error {
tor, err := settings.LoadTorrentDB(jreq.Hash)
if err != nil {
fmt.Println("Error get torrent:", jreq.Hash, err)
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
// return echo.NewHTTPError(http.StatusBadRequest, err.Error()) // Handle R/O DB
}
torrStatus := torr.TorrentAdded