huntapi/README.md
Finn Skov Henriksen d7479db902
Some checks failed
Build / Restore, build and publish (push) Failing after 2m7s
first commit
2026-08-31 12:29:23 +02:00

35 lines
979 B
Markdown

# HuntingAppApi
ASP.NET Core / .NET 10 Web API sample using Controllers, Newtonsoft.Json, Npgsql and PostGIS.
## Setup
```bash
createdb hunting_app
psql -d hunting_app -f Sql/001_schema.sql
dotnet restore
dotnet run
```
Update `appsettings.json` with your PostgreSQL connection string and JWT secret.
## Main endpoints
- `POST /api/auth/external-login`
- `GET /api/hunt-areas`
- `POST /api/hunt-areas`
- `GET /api/map-points/area/{huntAreaId}`
- `POST /api/map-points`
- `GET /api/hunts/area/{huntAreaId}`
- `POST /api/hunts`
- `POST /api/hunts/{huntId}/participants`
- `POST /api/hunts/{huntId}/assignments`
- `GET /api/hunts/{huntId}/participant-locations`
- `POST /api/locations`
- `GET /api/hunts/{huntId}/messages`
- `POST /api/hunts/{huntId}/messages`
## Important production notes
The external token validator is intentionally simple. Before production, validate Google/Microsoft ID tokens against issuer, audience/client ID, expiry and JWKS signature validation.