From 3d125fe8a2b0ae3009494c067cb28e15eabdb97f Mon Sep 17 00:00:00 2001 From: Pin Date: Sun, 31 Jan 2021 16:51:31 -0500 Subject: [PATCH] WIP Signed-off-by: Pin --- handlers/apihandler.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/handlers/apihandler.go b/handlers/apihandler.go index 4693c5e..964ea9e 100644 --- a/handlers/apihandler.go +++ b/handlers/apihandler.go @@ -8,26 +8,11 @@ import ( "dogapi/structs" ) -type Dog struct { - Id string `json:"id"` - Author string `json:"author"` - Title string `json:"title"` - Format string `json:"format"` - Hash string `json:"hash"` - Breed string `json:"breed"` - Url string `json:"url"` -} - func APIHandler(w http.ResponseWriter, r *http.Request) { switch r.Method { case "GET": var dogquery structs.DogPicRow dogquery = db.RandomSelect() - log.Println(dogquery) - var res Dog - res.Id = "1" - res.Author = "spencer" - res.Title = "cool dog" json.NewEncoder(w).Encode(dogquery) } }