chore: remaining server changes (code quality, go mod tidy)

Go mod tidy, minor server-side adjustments from security verification
and code quality cleanup pass.
This commit is contained in:
jevb
2026-04-01 11:38:33 +02:00
parent e626291dec
commit 447a4543e7
34 changed files with 214 additions and 178 deletions
+3 -3
View File
@@ -35,9 +35,9 @@ type createDMRequest struct {
// createDMResponse is the JSON response for POST /api/v1/dms.
type createDMResponse struct {
ChannelID int64 `json:"channel_id"`
ChannelID int64 `json:"channel_id"`
Recipient db.DMUser `json:"recipient"`
Created bool `json:"created"`
Created bool `json:"created"`
}
// listDMsResponse is the JSON response for GET /api/v1/dms.
@@ -102,7 +102,7 @@ func handleCreateDM(database *db.DB) http.HandlerFunc {
}
// Get or create the DM channel.
ch, created, err := database.GetOrCreateDMChannel(user.ID, req.RecipientID)
ch, created, err := database.GetOrCreateDMChannel(user.ID, req.RecipientID) //nolint:contextcheck // TODO: propagate context through this call path
if err != nil {
slog.Error("handleCreateDM GetOrCreateDMChannel", "err", err,
"user_id", user.ID, "recipient_id", req.RecipientID)