This commit is contained in:
2023-08-07 10:14:38 -04:00
parent a30b1769b3
commit 5dd3fa9451
18 changed files with 548 additions and 276 deletions

View File

@@ -1,20 +1,8 @@
package Photo
import (
"git.siteworxpro.com/gun-manager/sql"
"github.com/gorilla/mux"
"net/http"
"strconv"
)
func Get(w http.ResponseWriter, r *http.Request) {
db := sql.GetDb()
id, _ := strconv.ParseInt(mux.Vars(r)["id"], 10, 32)
photo := db.GetPhoto(uint(id))
_, err := w.Write([]byte(photo))
if err != nil {
panic(err)
}
}