Fix build issue
Commented out some code for now
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
// "fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
@@ -14,15 +14,17 @@ type RequestAddContact struct {
|
|||||||
|
|
||||||
type LoginResponse struct {
|
type LoginResponse struct {
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
Data []model.Data`json:"data"`
|
// Data []model.Data`json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContactHandler struct {
|
type ContactHandler struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
func NewContactHandler(store model.Store) *ContactHandler {
|
func NewContactHandler(store model.Store) *ContactHandler {
|
||||||
return &ContactHandler{Store: store}
|
return &ContactHandler{Store: store}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
func (l *ContactHandler) AddContact(w http.ResponseWriter, r *http.Request) {
|
func (l *ContactHandler) AddContact(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Method != http.MethodPost {
|
if r.Method != http.MethodPost {
|
||||||
@@ -37,8 +39,8 @@ func (l *ContactHandler) AddContact(w http.ResponseWriter, r *http.Request) {
|
|||||||
defer r.Body.Close()
|
defer r.Body.Close()
|
||||||
|
|
||||||
var statusCode int
|
var statusCode int
|
||||||
/*
|
|
||||||
var resp LoginResponse
|
var resp LoginResponse
|
||||||
|
/*
|
||||||
|
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
|
|
||||||
@@ -78,5 +80,5 @@ func (l *ContactHandler) AddContact(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RespondWithJson(w, statusCode, &resp)
|
RespondWithJSON(w, statusCode, &resp)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user