feat(admin): staff API and the route table
Completes the service -- this is the first commit where the whole thing compiles and serves. staffCreateInstance adopts a cloud instance that already exists in the control plane, taking its name and slug from there and refusing when no such instance exists: an admin row pointing at nothing would issue licences nobody can use. Adopt then issue is how the existing read-only cloud instances get licensed. staffRelink has no attempt cap. The customer-facing limit exists to put a human in front of the fourth attempt, and this is that human. Editing a plan changes what a tier grants from now on only; existing licences snapshotted theirs at issue time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/mrhid6/vantage/admin/internal/api"
|
||||
"github.com/mrhid6/vantage/admin/internal/auth"
|
||||
"github.com/mrhid6/vantage/admin/internal/config"
|
||||
"github.com/mrhid6/vantage/admin/internal/db"
|
||||
@@ -72,7 +73,7 @@ func main() {
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: cfg.Addr,
|
||||
Handler: http.NotFoundHandler(), // replaced in Task 8
|
||||
Handler: api.Routes(cfg),
|
||||
ReadHeaderTimeout: 10 * time.Second,
|
||||
ReadTimeout: 20 * time.Second,
|
||||
WriteTimeout: 30 * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user