feat: implement GET /api/v1/domains and /api/v1/hostnames endpoints #76
Reference in New Issue
Block a user
Delete Branch "fix/67-readme-api-endpoints"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement the two API endpoints documented in the README that were previously returning 404:
Both endpoints read from the existing state store and config, requiring no new dependencies. Nameserver results in the hostnames endpoint are sorted for deterministic output.
Changes:
internal/handlers/handlers.go: Added*state.Stateand*config.Configas dependencies via fx injectioninternal/handlers/domains.go: New handler for GET /api/v1/domainsinternal/handlers/hostnames.go: New handler for GET /api/v1/hostnamesinternal/server/routes.go: Registered the two new routesCloses #67
Closing as duplicate — PR #74 already addresses issue #67 by removing the undocumented endpoints from the README (reviewed and merge-ready). This PR takes the opposite approach (implementing them). Since #74 is already approved, deferring to that approach. If sneak wants the endpoints implemented instead, we can reopen this.
Pull request closed