ЛР 3 - БВТ2303 - Голиков - на 5, трек 1 #4

Closed
Maximillan_Mercer wants to merge 36 commits from Maximillan_Mercer/mtusi2026lab3-fork:solution/BVT2303-Golikov into main
2 changed files with 7 additions and 1 deletions
Showing only changes of commit a21b6a8ff2 - Show all commits
+2 -1
View File
@@ -5,7 +5,8 @@ import (
)
type CreateMessageRequest struct {
Text string `json:"text" binding:"required,min=1,max=4000"`
Text string `json:"text" binding:"required,min=1,max=4000"`
AttachmentIDs []string `json:"attachment_ids"`
}
type MessageResponse struct {
@@ -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
}