tsk-14: Record when message was sent (#16)

Closes #14

Reviewed-on: #16
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-12-01 21:24:05 +00:00
committed by phoenix
parent 04da7785c8
commit c809815549
10 changed files with 118 additions and 28 deletions
+3 -3
View File
@@ -19,15 +19,15 @@ type Message struct {
}
type getMessageResponse struct {
Message string `json:"message"`
Data []*message.Message `json:"data"`
Message string `json:"message"`
Data []*message.Message `json:"data"`
}
func (m *Message) GetMessage(id uuid.UUID) (*message.Message, error) {
params := url.Values{}
params.Add("id", id.String())
pm := params.Encode()
fullUrl := fmt.Sprintf("%s/api/v1/message?%s", m.Application.ApiUrl, pm)
fullUrl := fmt.Sprintf("%s/api/v1/message?%s", m.Application.ApiUrl, pm)
fmt.Println("Url:", fullUrl)
req, err := http.NewRequest("GET", fullUrl, nil)
if err != nil {