mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user