Toggle navigation
Toggle navigation
This project
Loading...
Sign in
방승일
/
mamuri-bot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
윤준석
2022-05-13 23:40:18 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fb5282776180cba536bc045eaf97bafb80361261
fb528277
1 parent
ce6659df
ADD: controller about search items by keyword
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletions
joongna/controller/controller.go
joongna/router/router.go
joongna/controller/controller.go
0 → 100644
View file @
fb52827
package
controller
import
(
"joongna/service"
"net/http"
"github.com/labstack/echo/v4"
)
func
Search
(
c
echo
.
Context
)
error
{
keyword
:=
c
.
Param
(
"keyword"
)
items
,
err
:=
service
.
GetItemByKeyword
(
keyword
)
if
err
!=
nil
{
return
err
}
return
c
.
JSON
(
http
.
StatusOK
,
items
)
}
joongna/router/router.go
View file @
fb52827
package
router
import
"github.com/labstack/echo/v4"
import
(
"joongna/controller"
"github.com/labstack/echo/v4"
)
const
(
API
=
"/api/v2"
...
...
Please
register
or
login
to post a comment