Add Project API moderation and meta support#43
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
WalkthroughAdds moderation-threshold management and meta-listing APIs to projectapi: new types and Service methods, implementations for Get/Set moderation thresholds and ListMimeTypes/ListModerationCategories, CHANGELOG update, and tests covering JSON serialization, meta endpoints, moderation GET/PUT behavior, and path validation. ChangesModeration thresholds and meta reference APIs
Sequence Diagram(s)sequenceDiagram
participant Client
participant ProjectAPIService
participant ResourceOp
participant UploadcareAPI
Client->>ProjectAPIService: GetModerationThresholds(pubKey)
ProjectAPIService->>ResourceOp: ResourceOp(GET, /projects/{pubKey}/moderation/thresholds/)
ResourceOp->>UploadcareAPI: HTTP GET /projects/{pubKey}/moderation/thresholds/
UploadcareAPI-->>ResourceOp: 200 JSON (ModerationThresholds)
ResourceOp-->>ProjectAPIService: decoded ModerationThresholds
ProjectAPIService-->>Client: ModerationThresholds
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
f7a067a to
14bce1e
Compare
|
|
||
| type MimeTypeFiltering struct { | ||
| MimeTypes []string `json:"mime_types,omitempty"` | ||
| IsMimeFilteringEnabled *bool `json:"is_mime_filtering_enabled,omitempty"` |
There was a problem hiding this comment.
should we add rename to BREAKING CHANGES ?
MimeTypeFiltering (is_mime_filtering_enabled → is_enabled)
There was a problem hiding this comment.
Project API wasn't released yet, so I think we can just edit it
Summary
mime_type_filtering.is_enabledrename and new billing-related feature fields.Validation
go test ./projectapigo list ./... | grep -v '/test$' | xargs go testNote: the full
go test ./...still requires integration credentials for thetestpackage (SECRET_KEYandPUBLIC_KEY).Summary by CodeRabbit
New Features
Tests
Chores