Commit Graph

9 Commits

Author SHA1 Message Date
Hayden 03df23d97c fix: inaccruate 401 & sql busy error (#679)
* fix inaccruate 401 error on SQL db error

* init golangci-lint config

* linter autofix

* testify auto fixes

* fix sqlite busy errors

* fix naming

* more linter errors

* fix rest of linter issues

Former-commit-id: e8449b3a73
2024-01-04 08:55:26 -09:00
Hayden 64b3ac3e94
change safeserve -> httpkit (#405) 2023-04-09 10:39:43 -08:00
Hayden db80f8a159
chore: refactor api endpoints (#339)
* move typegen code

* update taskfile to fix code-gen caches and use 'dir' attribute

* enable dumping stack traces for errors

* log request start and stop

* set zerolog stack handler

* fix routes function

* refactor context adapters to use requests directly

* change some method signatures to support GID

* start requiring validation tags

* first pass on updating handlers to use adapters

* add errs package

* code gen

* tidy

* rework API to use external server package
2023-03-20 20:32:10 -08:00
Hayden 23b5892aef
feat: Notifiers CRUD (#337)
* introduce scaffold for new models

* wip: shoutrrr wrapper (may remove)

* update schema files

* gen: ent code

* gen: migrations

* go mod tidy

* add group_id to notifier

* db migration

* new mapper helpers

* notifier repo

* introduce experimental adapter pattern for hdlrs

* refactor adapters to fit more common use cases

* new routes for notifiers

* update errors to fix validation panic

* go tidy

* reverse checkbox label display

* wip: notifiers UI

* use badges instead of text

* improve documentation

* add scaffold schema reference

* remove notifier service

* refactor schema folder

* support group edges via scaffold

* delete test file

* include link to API docs

* audit and update documentation + improve format

* refactor schema edges

* refactor

* add custom validator

* set validate + order fields by name

* fix failing tests
2023-03-06 21:18:58 -09:00
Hayden d6da63187b
feat: new homepage statistic API's (#167)
* add date format and orDefault helpers

* introduce new statistics calculations queries

* rework statistics endpoints

* code generation

* fix styles on photo card

* label and location aggregation endpoints

* code-gen

* cleanup parser and defaults

* remove debug point

* setup E2E Testing

* linters

* formatting

* fmt plus name support on time series data

* code gen
2022-12-05 12:36:32 -09:00
Hayden 7e0f1fac23
feat: group statistics endpoint (#123)
* group statistics endpoint

* remove item store

* return possible errors

* add statistics tests
2022-11-01 13:58:05 -08:00
Hayden cd82fe0d89
refactor: remove empty services (#116)
* remove empty services

* remove old factory

* remove old static files

* cleanup more duplicate service code

* file/folder reorg
2022-10-29 20:05:38 -08:00
Hayden 6529549289
refactor: http interfaces (#114)
* implement custom http handler interface

* implement trace_id

* normalize http method spacing for consistent logs

* fix failing test

* fix linter errors

* cleanup old dead code

* more route cleanup

* cleanup some inconsistent errors

* update and generate code

* make taskfile more consistent

* update task calls

* run tidy

* drop `@` tag for version

* use relative paths

* tidy

* fix auto-setting variables

* update build paths

* add contributing guide

* tidy
2022-10-29 18:15:35 -08:00
Hayden d151d42081
feat: debug-endpoints (#110)
* reorg + pprof endpoints

* fix spacing issue

* fix generation directory
2022-10-24 18:24:18 -08:00