2026-01-28 14:58:13 +00:00
|
|
|
package sync
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/db/models"
|
2026-01-30 18:21:27 +00:00
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/html"
|
2026-01-28 14:58:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type ContentTextMessages struct {
|
|
|
|
|
User User
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func getTextMessages(w http.ResponseWriter, r *http.Request, u *models.User) {
|
|
|
|
|
userContent, err := contentForUser(r.Context(), u)
|
|
|
|
|
if err != nil {
|
|
|
|
|
respondError(w, "Failed to get user", err, http.StatusInternalServerError)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
content := ContentTextMessages{
|
|
|
|
|
User: userContent,
|
|
|
|
|
}
|
2026-02-07 05:51:21 +00:00
|
|
|
html.RenderOrError(w, "sync/text-messages.html", content)
|
2026-01-28 14:58:13 +00:00
|
|
|
}
|