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:
phoenix
2025-11-29 20:22:31 +00:00
committed by phoenix
parent 1646428016
commit a8dbd693ba
21 changed files with 31 additions and 37 deletions
+6 -6
View File
@@ -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)