fix(api): accept attachment_ids in message DTO and validate cursor uuid

This commit is contained in:
2026-10-10 11:36:53 +03:00
parent 02daa062f8
commit a21b6a8ff2
2 changed files with 7 additions and 1 deletions
@@ -6,6 +6,8 @@ import (
"time"
"high-loud-apps-labs/internal/domain"
"github.com/google/uuid"
)
// Взял за основу что в inmemery делал
@@ -30,6 +32,9 @@ func decodeCursor(cursor, expectedScope string) (time.Time, string, error) {
if err != nil {
return time.Time{}, "", badCursor()
}
if _, err := uuid.Parse(parts[2]); err != nil {
return time.Time{}, "", badCursor()
}
return t, parts[2], nil
}