Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: go install github.com/swaggo/swag/cmd/swag@latest
- name: Generate Swagger docs
working-directory: backend
run: swag init -d cmd/server,internal/api -g main.go --parseDependency --parseInternal -o docs
run: swag init -d cmd/server,internal/handler -g main.go --parseDependency --parseInternal -o docs
- name: Test
run: cd backend && go test ./...

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Generate Swagger docs
if: matrix.language == 'go'
working-directory: backend
run: swag init -d cmd/server,internal/api -g main.go --parseDependency --parseInternal -o docs
run: swag init -d cmd/server,internal/handler -g main.go --parseDependency --parseInternal -o docs

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Generate Swagger docs
working-directory: backend
run: swag init -d cmd/server,internal/api -g main.go --parseDependency --parseInternal -o docs
run: swag init -d cmd/server,internal/handler -g main.go --parseDependency --parseInternal -o docs

- name: Build binary
working-directory: backend
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- HTTP handlers have been decomposed from the monolithic `internal/api`
package into feature-scoped subpackages under `internal/handler/`
(`auth`, `calls`, `bookmarks`, `share`, `setup`, `health`,
`admin/{imports,radioreference,transcriptions}`). Route registration
now lives in `internal/handler/routes`, and shared swagger DTOs and
helpers live in `internal/handler/shared`. No route paths, methods,
middleware ordering, response shapes, or status codes changed.
- Admin CRUD business logic has been extracted from `internal/ws` into a
new transport-agnostic `internal/admin` package. The WebSocket layer
now only routes `ADM_REQ` frames to `admin.Operations` methods; the
Expand Down
2 changes: 1 addition & 1 deletion backend/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ issues:
- "internal/db/models\\.go$"
- "internal/db/db\\.go$"
- "internal/db/querier\\.go$"
- "internal/api/swagger_models\\.go$" # swagger stubs — field names must mirror wire shape for doc readability
- "internal/handler/shared/dto\\.go$" # swagger stubs — field names must mirror wire shape for doc readability
exclude-rules:
# Test files: relax a handful of rules that don't add value there.
- path: _test\.go
Expand Down
2 changes: 1 addition & 1 deletion backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ VERSION?=$(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS=-s -w -X github.com/openscanner/openscanner/internal/config.Version=$(VERSION)

build:
swag init -d cmd/server,internal/api -g main.go --parseDependency --parseInternal -o docs
swag init -d cmd/server,internal/handler -g main.go --parseDependency --parseInternal -o docs
go build -ldflags="$(LDFLAGS)" -o $(OUTPUT) $(CMD)

dev:
Expand Down
4 changes: 2 additions & 2 deletions backend/cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/kardianos/service"
"github.com/openscanner/openscanner/internal/admin"
"github.com/openscanner/openscanner/internal/api"
"github.com/openscanner/openscanner/internal/handler/routes"
"github.com/openscanner/openscanner/internal/audio"
"github.com/openscanner/openscanner/internal/auth"
"github.com/openscanner/openscanner/internal/cli"
Expand Down Expand Up @@ -892,7 +892,7 @@ func (p *program) run() {
// Start transcription result consumer (stores results in DB, broadcasts TRN).
go consumeTranscriptionResults(ctx, queries, hub, transcriberMgr)

api.RegisterRoutes(router, api.Deps{
routes.RegisterRoutes(router, routes.Deps{
Queries: queries,
RateLimiter: rateLimiter,
Processor: processor,
Expand Down
25 changes: 0 additions & 25 deletions backend/internal/api/health.go

This file was deleted.

Loading
Loading