Skip to content

Comments

feat(creators): add verification for creators#2135

Merged
waleedlatif1 merged 1 commit intostagingfrom
feat/apify
Nov 30, 2025
Merged

feat(creators): add verification for creators#2135
waleedlatif1 merged 1 commit intostagingfrom
feat/apify

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

add verification for creators, rename route to api/creators rather than api/creator-profile

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Nov 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Nov 30, 2025 4:55am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 30, 2025

Greptile Overview

Greptile Summary

This PR adds a verification system for template creators and renames the API route from api/creator-profile to api/creators for consistency.

Key Changes:

  • Added verified boolean field to template_creators database table with migration
  • Created new verification API endpoint (/api/creators/[id]/verify) restricted to super users only
  • Implemented VerifiedBadge component that displays next to verified creator names
  • Renamed all API routes from /api/creator-profiles to /api/creators across the codebase
  • Updated all frontend components and hooks to use the new API routes

Implementation Details:

  • Super user authorization is properly enforced in the verification endpoint
  • The verification badge is a clean SVG component with configurable sizes
  • All database queries properly check for super user status before allowing verification
  • The verified field defaults to false for all creators

The implementation is clean, follows existing patterns, and includes proper authorization checks.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation is straightforward with proper authorization checks, clean database migrations, and consistent API route renaming. All changes follow established patterns and include proper security validation.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/db/migrations/0115_redundant_cerebro.sql 5/5 Added verified boolean column with default false to template_creators table
packages/db/schema.ts 5/5 Added verified field to templateCreators schema with default false
apps/sim/app/api/creators/[id]/verify/route.ts 5/5 New verification endpoints with proper super user authorization checks
apps/sim/components/ui/verified-badge.tsx 5/5 New component displaying blue checkmark badge for verified creators
apps/sim/hooks/queries/creator-profile.ts 5/5 Updated API endpoint URLs from /api/creator-profiles to /api/creators

Sequence Diagram

sequenceDiagram
    participant SU as Super User
    participant UI as UI Component
    participant API as API Route
    participant DB as Database
    participant TC as Template Card
    
    Note over SU,DB: Creator Verification Flow
    SU->>UI: Navigate to creator profile
    SU->>API: POST /api/creators/[id]/verify
    API->>DB: Check user.isSuperUser
    alt Not Super User
        API-->>SU: 403 Forbidden
    else Super User
        API->>DB: Check creator exists
        alt Creator Not Found
            API-->>SU: 404 Not Found
        else Creator Exists
            API->>DB: UPDATE template_creators SET verified=true
            DB-->>API: Success
            API-->>SU: 200 OK
        end
    end
    
    Note over UI,TC: Display Verified Badge
    UI->>API: GET /api/creators
    API->>DB: SELECT * FROM template_creators
    DB-->>API: Return creators with verified status
    API-->>UI: Return creator profiles
    UI->>TC: Pass isVerified prop
    TC->>TC: Render VerifiedBadge if isVerified=true
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

16 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit a8f87f7 into staging Nov 30, 2025
5 checks passed
waleedlatif1 added a commit that referenced this pull request Dec 1, 2025
… sendgrid, linkedin, more tools (#2148)

* feat(tools): added smtp, sendgrid, mailgun, linkedin, fixed permissions in context menu (#2133)

* feat(tools): added twilio sendgrid integration

* feat(tools): added smtp, sendgrid, mailgun, fixed permissions in context menu

* added top level mocks for sporadically failing tests

* incr type safety

* fix(team-plans): track departed member usage so value not lost (#2118)

* fix(team-plans): track departed member usage so value not lost

* reset usage to 0 when they leave team

* prep merge with stagig

* regen migrations

* fix org invite + ws selection'

---------

Co-authored-by: Waleed <[email protected]>

* feat(i18n): update translations (#2134)

Co-authored-by: waleedlatif1 <[email protected]>

* feat(creators): add verification for creators (#2135)

* feat(tools): added apify block/tools  (#2136)

* feat(tools): added apify

* cleanup

* feat(i18n): update translations (#2137)

Co-authored-by: waleedlatif1 <[email protected]>

* feat(env): added more optional env var examples (#2138)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes (#2139)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes

* ack PR comments

* feat(tools): add generic search tool (#2140)

* feat(i18n): update translations (#2141)

* fix(sdks): bump sdk versions (#2142)

* fix(webhooks): count test webhooks towards usage limit (#2143)

* fix(bill): add requestId to webhook processing (#2144)

* improvement(subflow): remove all associated edges when moving a block into a subflow (#2145)

* improvement(subflow): remove all associated edges when moving a block into a subflow

* ack PR comments

* fix(polling): mark webhook failed on webhook trigger errors (#2146)

* fix(deps): declare core transient deps explicitly (#2147)

* fix(deps): declare core transient deps explicitly

* ack PR comments

---------

Co-authored-by: Vikhyath Mondreti <[email protected]>
Co-authored-by: waleedlatif1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant