예제 #1
0
func (a Controller) searchTrackByName(req gorelax.RelaxRequester, res gorelax.RelaxResponser) {
	trackName := req.Query("q")
	res.EnableCORS()
	res.SendAsJSON(service.SearchTrack(trackName), 200)
}
예제 #2
0
func (a Controller) searchArtistByName(req gorelax.RelaxRequester, res gorelax.RelaxResponser) {
	artistName := req.Query("q")
	res.EnableCORS()
	res.SendAsJSON(service.SearchArtist(artistName), 200)
}