Added Thumbnails and saving those to db,

also added Log for Locking and unlocking Rw, because there was a Problem with that, and now it stays
This commit is contained in:
Pablu23
2024-02-23 14:59:08 +01:00
parent cd26d937aa
commit 23f96e0ab5
9 changed files with 236 additions and 29 deletions

View File

@@ -46,6 +46,7 @@ func main() {
http.HandleFunc("POST /next", s.HandleNext)
http.HandleFunc("POST /prev", s.HandlePrev)
http.HandleFunc("POST /exit", s.HandleExit)
http.HandleFunc("POST /delete", s.HandleDelete)
fmt.Println("Server starting...")
err = http.ListenAndServe(":8000", nil)
@@ -55,7 +56,7 @@ func main() {
}
}
func Close(db *database.DatabaseManager) {
func Close(db *database.Manager) {
fmt.Println("Attempting to save and close DB")
err := db.Save()
if err != nil {