2 Commits

Author SHA1 Message Date
david aae68ba20e fix: format code with gofmt 2026-03-07 04:36:52 +01:00
david 8883cdcb86 chore: add /api to gitignore 2026-03-07 03:50:47 +01:00
4 changed files with 13 additions and 12 deletions
+1
View File
@@ -4,6 +4,7 @@ data/
*.db-shm *.db-shm
*.db-wal *.db-wal
apocapoc-api apocapoc-api
/api
dist/ dist/
bin/ bin/
.internal-notes/ .internal-notes/
@@ -13,9 +13,9 @@ import (
) )
type mockHabitRepoForBatch struct { type mockHabitRepoForBatch struct {
habits map[string]*entities.Habit habits map[string]*entities.Habit
createFunc func(ctx context.Context, habit *entities.Habit) error createFunc func(ctx context.Context, habit *entities.Habit) error
updateFunc func(ctx context.Context, habit *entities.Habit) error updateFunc func(ctx context.Context, habit *entities.Habit) error
softDeleteFunc func(ctx context.Context, id string) error softDeleteFunc func(ctx context.Context, id string) error
} }
+6 -6
View File
@@ -124,12 +124,12 @@ type SyncHabitDTO struct {
} }
type SyncHabitEntryDTO struct { type SyncHabitEntryDTO struct {
ID string `json:"id"` ID string `json:"id"`
HabitID string `json:"habit_id"` HabitID string `json:"habit_id"`
ScheduledDate time.Time `json:"scheduled_date"` ScheduledDate time.Time `json:"scheduled_date"`
CompletedAt time.Time `json:"completed_at"` CompletedAt time.Time `json:"completed_at"`
Value *float64 `json:"value,omitempty"` Value *float64 `json:"value,omitempty"`
UpdatedAt time.Time `json:"updated_at"` UpdatedAt time.Time `json:"updated_at"`
} }
type HabitChangesDTO struct { type HabitChangesDTO struct {
@@ -13,9 +13,9 @@ import (
) )
type SyncHandlers struct { type SyncHandlers struct {
getSyncChangesHandler *queries.GetSyncChangesHandler getSyncChangesHandler *queries.GetSyncChangesHandler
applySyncBatchHandler *commands.ApplySyncBatchHandler applySyncBatchHandler *commands.ApplySyncBatchHandler
translator *i18n.Translator translator *i18n.Translator
} }
func NewSyncHandlers( func NewSyncHandlers(