AletheiaFact / AletheiaFact/aletheia
Decorators refactor need validation
- Ngôn ngữ chính
- TypeScript
- Star
- 55
- Fork
- 20
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
### Background Information
### 🔵 Review Required - Ambiguous Routes
These endpoints have no explicit auth decorator and rely on global guards. **Need to determine if they should be @Public() or @Auth().**
#### Likely Public (Need Confirmation)
**stats.controller.ts:**
- [ ] `GET api/stats/home` - Probably public for homepage stats
**history.controller.ts:**
- [ ] `GET api/history/:targetModel/:targetId` - History viewing, likely public
**report.controller.ts:**
- [ ] `GET api/report/:data_hash` - Report viewing, likely public
**image.controller.ts:**
- [ ] `GET api/image/:data_hash` - Image viewing, likely public
**speech.controller.ts:**
- [ ] `GET api/speech/:id` - Speech viewing, likely public
**claim-revision.controller.ts:**
- [ ] `GET api/claim-revision/:id` - Revision viewing, likely public
**source.controller.ts:**
- [ ] `GET api/source/:id` - Source viewing, likely public
- [ ] `GET api/source/target/:targetId` - Source viewing, likely public
#### Likely Authenticated (Need Confirmation)
**automated-fact-checking.controller.ts:**
- [ ] `POST api/ai-fact-checking` - AI fact-checking, requires auth
**chat-bot.controller.ts:**
- [ ] `POST api/chatbot/hook` - Chatbot webhook, may need auth or be public
**file-management.controller.ts:**
- [ ] `POST api/image` - Image upload, requires auth
**notification.controller.ts:**
- [ ] `POST api/notification` - Send notification, requires auth/admin
- [ ] `POST api/topic-subscription` - Manage subscriptions, requires auth/admin
- [ ] `POST api/topic-subscription/:key/subscribers` - Manage subscribers, requires auth/admin
- [ ] `GET api/notification/token/:subscriberId` - Get notification token, requires auth
**sitemap.controller.ts:**
- [ ] `GET submit-sitemap` - Submit sitemap, likely admin
**topic.controller.ts:**
- [ ] `GET api/topics/search` - Topic search
- [ ] `POST api/topics` - Create topic, requires auth
**personality.controller.ts:**
- [ ] `POST api/personality` - Create personality, requires auth
- [ ] `PUT api/personality/:id` - Update personality, requires auth or admin
- [ ] `GET personality/search` - Personality search
- [ ] `GET personality/:slug/history` - History viewing
**badge.controller.ts:**
- [ ] `GET api/badge` - List badges, public or auth?
**claim.controller.ts (Write operations):**
- [ ] `POST api/claim` - Create claim, requires auth
- [ ] `POST api/claim/image` - Create image claim, requires auth
- [ ] `POST api/claim/debate` - Create debate, requires auth
- [ ] `POST api/claim/unattributed` - Create unattributed claim (marked temporary)
- [ ] `PUT api/claim/debate/:debateId` - Update debate, requires auth/admin
- [ ] `PUT api/claim/:id` - Update claim, requires auth
**claim.controller.ts (History/Revision pages):**
- [ ] `GET claim/:claimSlug/revision/:revisionId` - Revision viewing
- [ ] `GET personality/:personalitySlug/claim/:claimSlug/revision/:revisionId` - Revision viewing
- [ ] `GET claim/:claimSlug/history` - History viewing
- [ ] `GET personality/:personalitySlug/claim/:claimSlug/history` - History viewing
- [ ] `GET personality/:personalitySlug/claim/:claimSlug/sentence/:data_hash/history` - History viewing
- [ ] `GET claim/create` - Claim creation page, requires auth
**home.controller.ts:**
- [ ] `GET /home/:namespace?` - Home redirect
**review-task.controller.ts (All endpoints):**
- [ ] `GET api/reviewtask` - List review tasks
- [ ] `GET api/reviewtask/:id` - Get review task
- [ ] `POST api/reviewtask` - Create review task
- [ ] `PUT api/reviewtask/:data_hash` - Update review task
- [ ] `GET api/reviewtask/hash/:data_hash` - Get by hash
- [ ] `GET api/reviewtask/editor-content/:data_hash` - Get editor content
- [ ] `PUT api/reviewtask/add-comment/:data_hash` - Add comment
- [ ] `PUT api/reviewtask/delete-comment/:data_hash` - Delete comment
- [ ] `GET kanban` - Kanban board page
**source.controller.ts (Write operations):**
- [ ] `POST api/source` - Create source, requires auth
- [ ] `GET source/create` - Source creation page, requires auth
**view.controller.ts:**
- [ ] `GET totp` - TOTP setup page, requires auth
**verification-request.controller.ts:**
- [ ] `GET api/verification-request/search` - Search verification requests
- [ ] `GET api/verification-request/:id` - Get verification request
- [ ] `POST api/verification-request` - Create request (has custom M2M logic)
- [ ] `GET verification-request/create` - Create page, requires auth
- [ ] `PUT api/verification-request/:data_hash/topics` - Update topics, requires auth
- [ ] `PUT api/verification-request/:verificationRequestId/group` - Update group, requires auth/admin
- [ ] `GET verification-request/:data_hash/history` - History viewing
**sentence.controller.ts:**
- [ ] `PUT api/sentence/:data_hash` - Update sentence, requires auth
**image.controller.ts:**
- [ ] `PUT api/image/:data_hash` - Update image, requires auth
### How
Follow the new pattern defined and documented on `AUTH_DECORATOR_MIGRATION.MD`
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.