Implement the two API endpoints documented in the README that were previously returning 404:
GET /api/v1/domains: Returns configured domains with their discovered nameservers, last check time, and status (ok/pending).
GET /api/v1/hostnames: Returns configured hostnames with per-nameserver DNS records, status, and last check time.
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.State and *config.Config as dependencies via fx injection
internal/handlers/domains.go: New handler for GET /api/v1/domains
internal/handlers/hostnames.go: New handler for GET /api/v1/hostnames
internal/server/routes.go: Registered the two new routes
Implement the two API endpoints documented in the README that were previously returning 404:
- **GET /api/v1/domains**: Returns configured domains with their discovered nameservers, last check time, and status (ok/pending).
- **GET /api/v1/hostnames**: Returns configured hostnames with per-nameserver DNS records, status, and last check time.
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.State` and `*config.Config` as dependencies via fx injection
- `internal/handlers/domains.go`: New handler for GET /api/v1/domains
- `internal/handlers/hostnames.go`: New handler for GET /api/v1/hostnames
- `internal/server/routes.go`: Registered the two new routes
Closes #67
Implement the two API endpoints documented in the README that were
previously returning 404:
- GET /api/v1/domains: Returns configured domains with their
discovered nameservers, last check time, and status (ok/pending).
- GET /api/v1/hostnames: Returns configured hostnames with
per-nameserver DNS records, status, and last check time.
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.
Closes#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.
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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