Conversation
anishalle
left a comment
There was a problem hiding this comment.
everything else lgtm.
| Stats []store.ScanStat `json:"stats"` | ||
| } | ||
|
|
||
| type UpdateScanTypesPayload struct { |
There was a problem hiding this comment.
it it common to have two of the same type of struct? one for update and one for get? This is structurally similar to ScanStatsResponse except for the validate:.
There was a problem hiding this comment.
I mean it could be one but I'm just following existing pattern. Also in the future if I want to add other fields to the response in the future it's easier. Like a created_at.
There was a problem hiding this comment.
Did you intentionally remove the first line of the headers:
Examples:
// getOrCreateApplicationHandler returns the user's application, creating a draft if none exists
// updateApplicationHandler updates the user's draft application
There was a problem hiding this comment.
Uh yeah I feel like the swagger descriptions pretty self explanatory already. Also I don't like when comments restate the function. Lowkey claudes faults.
There was a problem hiding this comment.
wait claudes smarter than me... Apparently it's needed . I'll go add them again.
There was a problem hiding this comment.
same questions about the first line
There was a problem hiding this comment.
same as previous comments
There was a problem hiding this comment.
only first method has the first line in the header
There was a problem hiding this comment.
OPs I gotta delete that
There was a problem hiding this comment.
same question about headers
|
@copilot Review this PR (I wanna see what it says) |
|
@anishalle I've opened a new pull request, #34, to work on those changes. Once the pull request is ready, I'll request review from you. |
Summary
distribution)
cache in the settings table
stats
New API Routes
Method: GET
Route: /v1/admin/scans/types
Role: admin
Description: List configured scan types
Method: POST
Route: /v1/admin/scans
Role: admin
Description: Record a scan for a user
Method: GET
Route: /v1/admin/scans/user/{userID}
Role: admin
Description: Get all scans for a user
Method: GET
Route: /v1/admin/scans/stats
Role: admin
Description: Aggregate scan counts by type
Method: PUT
Route: /v1/superadmin/settings/scan-types
Role: super_admin
Description: Replace scan type configuration
Key Design Decisions
first
on duplicates
incremented atomically inside the create-scan transaction — avoids COUNT(*) aggregation on
every poll
check_in, meal, swag
Migrations