You've already forked gun-manager-backend
commit
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user