윤준석

ADD: router constant value and routing

1 +package router
2 +
3 +import "github.com/labstack/echo/v4"
4 +
5 +const (
6 + API = "/api/v2"
7 + APIJoongNa = API + "/JoongNa"
8 + APIKeyword = APIJoongNa + "/:keyword"
9 +)
10 +
11 +func Init(e *echo.Echo) {
12 + e.GET(APIKeyword, controller.Search)
13 +}
...@@ -3,7 +3,6 @@ package service ...@@ -3,7 +3,6 @@ package service
3 import ( 3 import (
4 "bytes" 4 "bytes"
5 "encoding/json" 5 "encoding/json"
6 - "fmt"
7 "io" 6 "io"
8 "io/ioutil" 7 "io/ioutil"
9 "joongna/config" 8 "joongna/config"
...@@ -42,7 +41,6 @@ func GetItemByKeyword(keyword string) ([]model.Item, error) { ...@@ -42,7 +41,6 @@ func GetItemByKeyword(keyword string) ([]model.Item, error) {
42 ItemUrl: itemUrl, 41 ItemUrl: itemUrl,
43 ExtraInfo: extraInfo, 42 ExtraInfo: extraInfo,
44 } 43 }
45 - fmt.Println(item)
46 items = append(items, item) 44 items = append(items, item)
47 } 45 }
48 return items, nil 46 return items, nil
......