Add auto-create projects on upload and API create endpoint #92
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
qwc-open/asiakirjat!92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/auto-create-projects"
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?
Summary
projects.auto_createconfig option (default:false) — when enabled, uploading to a non-existent project slug automatically creates the project withprivatevisibilityPOST /api/projectsendpoint for explicit project creation via API (JSON body withslug,name,description,visibility)customtoprivate(admin UI form + Go fallback)^[a-z0-9]+(?:-[a-z0-9]+)*$, 1-128 chars)Auto-create behavior
GetBySlugFiles changed
internal/config/config.go— newProjectsConfigstructinternal/handler/auto_create.go—isValidSlug,canAutoCreate,autoCreateProjectinternal/handler/api.go— restructuredhandleAPIUploadWithSlug+ newhandleAPICreateProjectinternal/handler/upload.go— auto-create in web upload pathinternal/handler/admin.go— visibility fallbackcustom→privateinternal/templates/pages/admin_projects.html— default selection + label fixTest plan
go buildsucceedsTestIsValidSlug,TestAPIUploadAutoCreate*,TestWebUploadAutoCreateProject,TestAPICreateProject*projects.auto_create: true, upload to new slug via API, verify project createdPOST /api/projects, verify 201 response🤖 Generated with Claude Code