Skip to content

Create Access controller admin endpoints #443

Description

@magush27

Add admin-protected endpoints for managing Access clients through Postman or future admin panel.

File: api/controllers/access.js

Endpoints:

  1. POST /api/admin/access-clients - Create new Access client
    • Requires admin authentication
    • Creates AccessClient and updates boards with accessCode
    • Validates rootBoardId exists
  2. GET /api/admin/access-clients - List all clients with stats
    • Returns all clients with board counts, expiry status
    • Populates rootBoard and createdBy
  3. PUT /api/admin/access-clients/:code - Update client
    • Updates allowed fields: isActive, isListedInApp, subscription dates, branding
  4. GET /api/admin/access-clients/:code/stats - Get detailed statistics
    • Returns client info, access counts, board list with tile counts

Tasks:

  • Implement createAccessClient with board association
  • Implement listAccessClients with computed fields
  • Implement updateAccessClient
  • Implement getAccessClientStats

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions