tsk-40: Get Contact bug (#46)
Closes #40 Reviewed-on: phoenix/textsender-api#46 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/contact"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"git.kundeng.us/phoenix/textsender-api/internal/store"
|
||||
"git.kundeng.us/phoenix/textsender-models/pkg/contact"
|
||||
)
|
||||
|
||||
type RequestAddContact struct {
|
||||
@@ -20,11 +20,6 @@ type AddContactResponse struct {
|
||||
Data []contact.Contact `json:"data"`
|
||||
}
|
||||
|
||||
type GetContactResponse struct {
|
||||
Message string `json:"message"`
|
||||
Data []contact.Contact `json:"data"`
|
||||
}
|
||||
|
||||
type ContactHandler struct {
|
||||
ContactStore store.ContactStore
|
||||
}
|
||||
@@ -88,6 +83,11 @@ func (c *ContactHandler) AddContact(w http.ResponseWriter, r *http.Request) {
|
||||
RespondWithJSON(w, statusCode, &resp)
|
||||
}
|
||||
|
||||
type GetContactResponse struct {
|
||||
Message string `json:"message"`
|
||||
Data []contact.Contact `json:"data"`
|
||||
}
|
||||
|
||||
// GetContact godoc
|
||||
// @Summary Get contact
|
||||
// @Description Get a contact record to have a recipient to send a text to (requires JWT)
|
||||
|
||||
Reference in New Issue
Block a user